head	1.7;
access;
symbols
	REL9_0_0:1.7
	REL9_1_ALPHA1:1.7
	REL9_0_RC1:1.7
	REL9_0_BETA4:1.7
	REL9_0_STABLE:1.7.0.2
	REL9_0_BETA3:1.7
	REL9_0_BETA2:1.7
	REL8_1_21:1.1
	REL8_2_17:1.5
	REL8_3_11:1.5
	REL8_4_4:1.6
	REL9_0_BETA1:1.7
	REL9_0_ALPHA5_BRANCH:1.6.0.12
	REL9_0_ALPHA5:1.6
	REL8_1_20:1.1
	REL8_2_16:1.5
	REL8_3_10:1.5
	REL8_4_3:1.6
	REL9_0_ALPHA4:1.6
	REL9_0_ALPHA4_BRANCH:1.6.0.10
	REL8_5_ALPHA3:1.6
	REL8_5_ALPHA3_BRANCH:1.6.0.8
	REL8_1_19:1.1
	REL8_2_15:1.5
	REL8_3_9:1.5
	REL8_4_2:1.6
	REL8_5_ALPHA2:1.6
	REL8_5_ALPHA2_BRANCH:1.6.0.6
	REL8_1_18:1.1
	REL8_2_14:1.5
	REL8_3_8:1.5
	REL8_4_1:1.6
	REL8_5_ALPHA1:1.6
	REL8_5_ALPHA1_BRANCH:1.6.0.4
	REL8_4_STABLE:1.6.0.2
	REL8_4_0:1.6
	REL8_4_RC2:1.6
	REL8_4_RC1:1.6
	REL8_4_BETA2:1.6
	REL8_4_BETA1:1.6
	REL8_1_17:1.1
	REL8_2_13:1.5
	REL8_3_7:1.5
	REL8_1_16:1.1
	REL8_2_12:1.5
	REL8_3_6:1.5
	REL8_1_15:1.1
	REL8_2_11:1.5
	REL8_3_5:1.5
	REL8_1_14:1.1
	REL8_2_10:1.5
	REL8_3_4:1.5
	REL8_1_13:1.1
	REL8_2_9:1.5
	REL8_3_3:1.5
	REL8_1_12:1.1
	REL8_2_8:1.5
	REL8_3_2:1.5
	REL8_2_7:1.5
	REL8_3_1:1.5
	REL8_3_STABLE:1.5.0.4
	REL8_3_0:1.5
	REL8_3_RC2:1.5
	REL8_1_11:1.1
	REL8_2_6:1.5
	REL8_3_RC1:1.5
	REL8_3_BETA4:1.5
	REL8_3_BETA3:1.5
	REL8_3_BETA2:1.5
	REL8_3_BETA1:1.5
	REL8_1_10:1.1
	REL8_2_5:1.5
	REL8_1_9:1.1
	REL8_2_4:1.5
	REL8_1_8:1.1
	REL8_2_3:1.5
	REL8_1_7:1.1
	REL8_2_2:1.5
	REL8_1_6:1.1
	REL8_2_1:1.5
	REL8_2_STABLE:1.5.0.2
	REL8_2_0:1.5
	REL8_2_RC1:1.5
	REL8_2_BETA3:1.5
	REL8_2_BETA2:1.5
	REL8_1_5:1.1
	REL8_2_BETA1:1.5
	REL8_1_4:1.1
	REL8_1_3:1.1
	REL8_1_2:1.1
	REL8_1_1:1.1
	REL8_1_STABLE:1.1.0.2
	REL8_1_0:1.1
	REL8_1_0RC1:1.1
	REL8_1_0BETA4:1.1
	REL8_1_0BETA3:1.1
	REL8_1_0BETA2:1.1
	REL8_1_0BETA1:1.1;
locks; strict;
comment	@# @;


1.7
date	2010.04.03.07.23.01;	author petere;	state Exp;
branches;
next	1.6;

1.6
date	2008.11.14.10.22.46;	author petere;	state Exp;
branches;
next	1.5;

1.5
date	2006.09.16.00.30.18;	author momjian;	state Exp;
branches;
next	1.4;

1.4
date	2006.04.02.04.02.40;	author neilc;	state Exp;
branches;
next	1.3;

1.3
date	2006.02.04.22.38.39;	author tgl;	state Exp;
branches;
next	1.2;

1.2
date	2006.02.04.19.06.46;	author adunstan;	state Exp;
branches;
next	1.1;

1.1
date	2005.07.26.23.24.02;	author tgl;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Remove unnecessary xref endterm attributes and title ids

The endterm attribute is mainly useful when the toolchain does not support
automatic link target text generation for a particular situation.  In  the
past, this was required by the man page tools for all reference page links,
but that is no longer the case, and it now actually gets in the way of
proper automatic link text generation.  The only remaining use cases are
currently xrefs to refsects.
@
text
@<!--
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.6 2008/11/14 10:22:46 petere Exp $
PostgreSQL documentation
-->

<refentry id="SQL-DROPROLE">
 <refmeta>
  <refentrytitle>DROP ROLE</refentrytitle>
  <manvolnum>7</manvolnum>
  <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 [ IF EXISTS ] <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. The <xref
   linkend="sql-reassign-owned">
   and <xref linkend="sql-drop-owned">
   commands can be useful for this purpose.
  </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><literal>IF EXISTS</literal></term>
    <listitem>
     <para>
      Do not throw an error if the role does not exist. A notice is issued 
      in this case.
     </para>
    </listitem>
   </varlistentry>

   <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"> 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"></member>
   <member><xref linkend="sql-alterrole"></member>
   <member><xref linkend="sql-set-role"></member>
  </simplelist>
 </refsect1>

</refentry>
@


1.6
log
@Set SQL man pages to be section 7 by default, and only transform them to
another section if required by the platform (instead of the old way of
building them in section "l" and always transforming them to the
platform-specific section).

This speeds up the installation on common platforms, and it avoids some
funny business with the man page tools and build process.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.5 2006/09/16 00:30:18 momjian Exp $
d8 1
a8 1
  <refentrytitle id="SQL-DROPROLE-TITLE">DROP ROLE</refentrytitle>
d43 2
a44 2
   linkend="sql-reassign-owned" endterm="sql-reassign-owned-title">
   and <xref linkend="sql-drop-owned" endterm="sql-drop-owned-title">
d86 1
a86 1
   linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
d117 3
a119 3
   <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>
@


1.5
log
@Remove emacs info from footer of SGML files.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.4 2006/04/02 04:02:40 neilc Exp $
d9 1
@


1.4
log
@Correct some errors and do some SGML police work on the reference pages
for REASSIGN OWNED and DROP OWNED.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.3 2006/02/04 22:38:39 tgl Exp $
a122 17

<!-- 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:
-->
@


1.3
log
@Fix broken markup.
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.2 2006/02/04 19:06:46 adunstan Exp $
d41 4
a44 1
   and revoke any privileges the role has been granted.
@


1.2
log
@
DROP IF EXISTS for ROLE/USER/GROUP
@
text
@d2 1
a2 1
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_role.sgml,v 1.1 2005/07/26 23:24:02 tgl Exp $
a65 1
  <variablelist>
@


1.1
log
@Basic documentation for ROLEs.  The user-manag chapter still needs to
be rewritten, but at least the reference pages are reasonably sane.
@
text
@d2 1
a2 1
$PostgreSQL$
d23 1
a23 1
DROP ROLE <replaceable class="PARAMETER">name</replaceable> [, ...]
d57 11
@

