summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/drop_role.sgml
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-07-26 23:24:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-07-26 23:24:02 +0000
commit58d214e51fe50b10b4439da6ec263d54c155afbf (patch)
treeb2a52be5979b0405b9479be2650137d871816678 /doc/src/sgml/ref/drop_role.sgml
parent0c2d7e39f9089dc1c65d87e656f792f4910460bf (diff)
Basic documentation for ROLEs. The user-manag chapter still needs to
be rewritten, but at least the reference pages are reasonably sane.
Diffstat (limited to 'doc/src/sgml/ref/drop_role.sgml')
-rw-r--r--doc/src/sgml/ref/drop_role.sgml126
1 files changed, 126 insertions, 0 deletions
diff --git a/doc/src/sgml/ref/drop_role.sgml b/doc/src/sgml/ref/drop_role.sgml
new file mode 100644
index 00000000000..dc8a0896de1
--- /dev/null
+++ b/doc/src/sgml/ref/drop_role.sgml
@@ -0,0 +1,126 @@
+<!--
+$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.1 2005/07/26 23:24:02 tgl Exp $
+PostgreSQL documentation
+-->
+
+<refentry id="SQL-DROPROLE">
+ <refmeta>
+ <refentrytitle id="SQL-DROPROLE-TITLE">DROP ROLE</refentrytitle>
+ <refmiscinfo>SQL - Language Statements</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>DROP ROLE</refname>
+ <refpurpose>remove a database role</refpurpose>
+ </refnamediv>
+
+ <indexterm zone="sql-droprole">
+ <primary>DROP ROLE</primary>
+ </indexterm>
+
+ <refsynopsisdiv>
+<synopsis>
+DROP ROLE <replaceable class="PARAMETER">name</replaceable> [, ...]
+</synopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>Description</title>
+
+ <para>
+ <command>DROP ROLE</command> removes the specified role(s).
+ To drop a superuser role, you must be a superuser yourself;
+ to drop non-superuser roles, you must have <literal>CREATEROLE</>
+ privilege.
+ </para>
+
+ <para>
+ A role cannot be removed if it is still referenced in any database
+ of the cluster; an error will be raised if so. Before dropping the role,
+ you must drop all the objects it owns (or reassign their ownership)
+ and revoke any privileges the role has been granted.
+ </para>
+
+ <para>
+ However, it is not necessary to remove role memberships involving
+ the role; <command>DROP ROLE</> automatically revokes any memberships
+ of the target role in other roles, and of other roles in the target role.
+ The other roles are not dropped nor otherwise affected.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Parameters</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><replaceable class="PARAMETER">name</replaceable></term>
+ <listitem>
+ <para>
+ The name of the role to remove.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Notes</title>
+
+ <para>
+ <productname>PostgreSQL</productname> includes a program <xref
+ linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
+ same functionality as this command (in fact, it calls this command)
+ but can be run from the command shell.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+
+ <para>
+ To drop a role:
+<programlisting>
+DROP ROLE jonathan;
+</programlisting>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Compatibility</title>
+
+ <para>
+ The SQL standard defines <command>DROP ROLE</command>, but it allows
+ only one role to be dropped at a time, and it specifies different
+ privilege requirements than <productname>PostgreSQL</productname> uses.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <simplelist type="inline">
+ <member><xref linkend="sql-createrole" endterm="sql-createrole-title"></member>
+ <member><xref linkend="sql-alterrole" endterm="sql-alterrole-title"></member>
+ <member><xref linkend="sql-set-role" endterm="sql-set-role-title"></member>
+ </simplelist>
+ </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:nil
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:1
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:"../reference.ced"
+sgml-exposed-tags:nil
+sgml-local-catalogs:"/usr/lib/sgml/catalog"
+sgml-local-ecat-files:nil
+End:
+-->