@@ -48,13 +45,11 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
</para>
</refsect2>
<refsect2 id="R2-SQL-DROPUSER-2">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
Outputs
</title>
</refsect1>
<refsect1>
<title>Diagnostics</title>
<para>
<variablelist>
<varlistentry>
...
...
@@ -67,9 +62,7 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
</varlistentry>
<varlistentry>
<term><computeroutput>
ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does not exist
</computeroutput></term>
<term><computeroutput>ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
<listitem>
<para>
This message occurs if the user name is not found.
...
...
@@ -78,9 +71,7 @@ ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does
</varlistentry>
<varlistentry>
<term><computeroutput>
DROP USER: user "<replaceable class="parameter">name</replaceable>" owns database "<replaceable class="parameter">name</replaceable>", cannot be removed
</computeroutput></term>
<term><computeroutput>DROP USER: user "<replaceable class="parameter">name</replaceable>" owns database "<replaceable class="parameter">name</replaceable>", cannot be removed</computeroutput></term>
<listitem>
<para>
You must drop the database first or change its ownership.
...
...
@@ -90,37 +81,25 @@ DROP USER: user "<replaceable class="parameter">name</replaceable>" owns databas
</variablelist>
</para>
</refsect2>
</refsynopsisdiv>
</refsect1>
<refsect1>
<title>Notes</title>
<refsect1 id="R1-SQL-DROPUSER-1">
<refsect1info>
<date>1998-09-22</date>
</refsect1info>
<title>
Description
</title>
<para>
<command>DROP USER</command> removes the specified user from the database.
It does not remove tables, views, or other objects owned by the user. If the
user owns any database you get an error.
</para>
<para>
Use <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">
to add new users, and <xref linkend="SQL-ALTERUSER"
endterm="SQL-ALTERUSER-title"> to change a user's properties.
<productname>PostgreSQL</productname>
comes with a script <xref linkend="APP-DROPUSER"
endterm="APP-DROPUSER-title">
which has the same functionality as this command (in fact, it calls this command)
endterm="SQL-ALTERUSER-title"> to change a user's attributes.
<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 id="R1-SQL-DROPUSER-2">
<title>
Usage
</title>
<refsect1>
<title>Examples</title>
<para>
To drop a user account:
<programlisting>
...
...
@@ -129,23 +108,26 @@ DROP USER jonathan;
</para>
</refsect1>
<refsect1 id="R1-SQL-DROPUSER-3">
<title>
Compatibility
</title>
<refsect2 id="R2-SQL-DROPUSER-4">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
SQL92
</title>
<refsect1>
<title>Compatibility</title>
<para>
There is no <command>DROP USER</command> in <acronym>SQL92</acronym>.
The <command>DROP USER</command> statement is a
<productname>PostgreSQL</productname> extension. The SQL standard
leaves the definition of users to the implementation.