]> granicus.if.org Git - postgresql/blob - doc/src/sgml/ref/drop_user.sgml
1cdf1dfeab4e64dfa12e3cf66cfa50c623116ed7
[postgresql] / doc / src / sgml / ref / drop_user.sgml
1 <!--
2 $PostgreSQL: pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.19 2003/11/29 19:51:38 pgsql Exp $
3 PostgreSQL documentation
4 -->
5
6 <refentry id="SQL-DROPUSER">
7  <refmeta>
8   <refentrytitle id="SQL-DROPUSER-TITLE">DROP USER</refentrytitle>
9   <refmiscinfo>SQL - Language Statements</refmiscinfo>
10  </refmeta>
11
12  <refnamediv>
13   <refname>DROP USER</refname>
14   <refpurpose>remove a database user account</refpurpose>
15  </refnamediv>
16
17  <indexterm zone="sql-dropuser">
18   <primary>DROP USER</primary>
19  </indexterm>
20
21  <refsynopsisdiv>
22 <synopsis>
23 DROP USER <replaceable class="PARAMETER">name</replaceable>
24 </synopsis>
25  </refsynopsisdiv>
26
27  <refsect1>
28   <title>Description</title>
29
30   <para>
31    <command>DROP USER</command> removes the specified user.
32    It does not remove tables, views, or other objects owned by the user. If the
33    user owns any database, an error is raised.
34   </para>
35  </refsect1>
36
37  <refsect1>
38   <title>Parameters</title>
39
40   <variablelist>
41    <varlistentry>
42     <term><replaceable class="PARAMETER">name</replaceable></term>
43     <listitem>
44      <para>
45       The name of the user to remove.
46      </para>
47     </listitem>
48    </varlistentry>
49   </variablelist>
50  </refsect1>
51
52  <refsect1>
53   <title>Notes</title>
54
55   <para>
56    <productname>PostgreSQL</productname> includes a program <xref
57    linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
58    same functionality as this command (in fact, it calls this command)
59    but can be run from the command shell.
60   </para>
61
62   <para>
63    To drop a user who owns a database, first drop the database or change
64    its ownership.
65   </para>
66  </refsect1>
67
68  <refsect1>
69   <title>Examples</title>
70
71   <para>
72    To drop a user account:
73 <programlisting>
74 DROP USER jonathan;
75 </programlisting>
76   </para>
77  </refsect1>
78  
79  <refsect1>
80   <title>Compatibility</title>
81   
82   <para>
83    The <command>DROP USER</command> statement is a
84    <productname>PostgreSQL</productname> extension.  The SQL standard
85    leaves the definition of users to the implementation.
86   </para>
87  </refsect1>
88
89  <refsect1>
90   <title>See Also</title>
91
92   <simplelist type="inline">
93    <member><xref linkend="sql-alteruser" endterm="sql-alteruser-title"></member>
94    <member><xref linkend="sql-createuser" endterm="sql-createuser-title"></member>
95   </simplelist>
96  </refsect1>
97
98 </refentry>
99
100 <!-- Keep this comment at the end of the file
101 Local variables:
102 mode: sgml
103 sgml-omittag:nil
104 sgml-shorttag:t
105 sgml-minimize-attributes:nil
106 sgml-always-quote-attributes:t
107 sgml-indent-step:1
108 sgml-indent-data:t
109 sgml-parent-document:nil
110 sgml-default-dtd-file:"../reference.ced"
111 sgml-exposed-tags:nil
112 sgml-local-catalogs:"/usr/lib/sgml/catalog"
113 sgml-local-ecat-files:nil
114 End:
115 -->