"...postgres-fd-implementation.git" did not exist on "02138357ffc8c41a3d646035368712a5394f1f5f"
drop_user.sgml 2.9 KB
Newer Older
1
<!--
2
$PostgreSQL: pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.20 2005/01/04 00:39:53 tgl Exp $
3
PostgreSQL documentation
4 5
-->

6 7
<refentry id="SQL-DROPUSER">
 <refmeta>
8
  <refentrytitle id="SQL-DROPUSER-TITLE">DROP USER</refentrytitle>
9 10
  <refmiscinfo>SQL - Language Statements</refmiscinfo>
 </refmeta>
11

12
 <refnamediv>
13 14
  <refname>DROP USER</refname>
  <refpurpose>remove a database user account</refpurpose>
15
 </refnamediv>
16

Peter Eisentraut's avatar
Peter Eisentraut committed
17 18 19 20
 <indexterm zone="sql-dropuser">
  <primary>DROP USER</primary>
 </indexterm>

21
 <refsynopsisdiv>
22
<synopsis>
23
DROP USER <replaceable class="PARAMETER">name</replaceable>
24 25
</synopsis>
 </refsynopsisdiv>
26

27 28 29 30
 <refsect1>
  <title>Description</title>

  <para>
31
   <command>DROP USER</command> removes the specified user.
32 33 34
   It does not remove tables, views, or other objects owned by the user. If the
   user owns any database, an error is raised.
  </para>
35
 </refsect1>
36

37 38 39 40 41 42 43 44 45 46 47 48 49
 <refsect1>
  <title>Parameters</title>

  <variablelist>
   <varlistentry>
    <term><replaceable class="PARAMETER">name</replaceable></term>
    <listitem>
     <para>
      The name of the user to remove.
     </para>
    </listitem>
   </varlistentry>
  </variablelist>
50
 </refsect1>
51

52 53 54
 <refsect1>
  <title>Notes</title>

55
  <para>
56 57 58
   <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)
59
   but can be run from the command shell.
60
  </para>
61 62 63 64 65

  <para>
   To drop a user who owns a database, first drop the database or change
   its ownership.
  </para>
66 67 68 69 70 71 72

  <para>
   It is unwise to drop a user who either owns any database objects or has any
   granted permissions on objects.  Currently, this is only enforced for
   the case of owners of databases, but it is likely that future versions of
   <productname>PostgreSQL</productname> will check other cases.
  </para>
73
 </refsect1>
74

75 76 77
 <refsect1>
  <title>Examples</title>

78
  <para>
79
   To drop a user account:
80 81 82
<programlisting>
DROP USER jonathan;
</programlisting>
83 84
  </para>
 </refsect1>
85
 
86 87
 <refsect1>
  <title>Compatibility</title>
88
  
89 90 91 92 93
  <para>
   The <command>DROP USER</command> statement is a
   <productname>PostgreSQL</productname> extension.  The SQL standard
   leaves the definition of users to the implementation.
  </para>
94
 </refsect1>
95 96 97 98 99 100

 <refsect1>
  <title>See Also</title>

  <simplelist type="inline">
   <member><xref linkend="sql-alteruser" endterm="sql-alteruser-title"></member>
101
   <member><xref linkend="sql-createuser" endterm="sql-createuser-title"></member>
102 103 104
  </simplelist>
 </refsect1>

105
</refentry>
106 107 108 109

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
110
sgml-omittag:nil
111 112 113 114 115 116 117 118 119 120 121 122
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:
-->