@@ -48,13 +45,11 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
...
@@ -48,13 +45,11 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
</para>
</para>
</refsect2>
</refsect2>
<refsect2 id="R2-SQL-DROPUSER-2">
</refsect1>
<refsect2info>
<date>1998-09-22</date>
<refsect1>
</refsect2info>
<title>Diagnostics</title>
<title>
Outputs
</title>
<para>
<para>
<variablelist>
<variablelist>
<varlistentry>
<varlistentry>
...
@@ -67,9 +62,7 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
...
@@ -67,9 +62,7 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
</varlistentry>
</varlistentry>
<varlistentry>
<varlistentry>
<term><computeroutput>
<term><computeroutput>ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does not exist
</computeroutput></term>
<listitem>
<listitem>
<para>
<para>
This message occurs if the user name is not found.
This message occurs if the user name is not found.
...
@@ -78,9 +71,7 @@ ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does
...
@@ -78,9 +71,7 @@ ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does
</varlistentry>
</varlistentry>
<varlistentry>
<varlistentry>
<term><computeroutput>
<term><computeroutput>DROP USER: user "<replaceable class="parameter">name</replaceable>" owns database "<replaceable class="parameter">name</replaceable>", cannot be removed</computeroutput></term>
DROP USER: user "<replaceable class="parameter">name</replaceable>" owns database "<replaceable class="parameter">name</replaceable>", cannot be removed
</computeroutput></term>
<listitem>
<listitem>
<para>
<para>
You must drop the database first or change its ownership.
You must drop the database first or change its ownership.
...
@@ -90,37 +81,25 @@ DROP USER: user "<replaceable class="parameter">name</replaceable>" owns databas
...
@@ -90,37 +81,25 @@ DROP USER: user "<replaceable class="parameter">name</replaceable>" owns databas
</variablelist>
</variablelist>
</para>
</para>
</refsect2>
</refsect1>
</refsynopsisdiv>
<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>
<para>
Use <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">
Use <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">
to add new users, and <xref linkend="SQL-ALTERUSER"
to add new users, and <xref linkend="SQL-ALTERUSER"
endterm="SQL-ALTERUSER-title"> to change a user's properties.
endterm="SQL-ALTERUSER-title"> to change a user's attributes.
<productname>PostgreSQL</productname>
<productname>PostgreSQL</productname> includes a program <xref
comes with a script <xref linkend="APP-DROPUSER"
linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
endterm="APP-DROPUSER-title">
same functionality as this command (in fact, it calls this command)
which has the same functionality as this command (in fact, it calls this command)
but can be run from the command shell.
but can be run from the command shell.
</para>
</para>
</refsect1>
</refsect1>
<refsect1 id="R1-SQL-DROPUSER-2">
<refsect1>
<title>
<title>Examples</title>
Usage
</title>
<para>
<para>
To drop a user account:
To drop a user account:
<programlisting>
<programlisting>
...
@@ -129,23 +108,26 @@ DROP USER jonathan;
...
@@ -129,23 +108,26 @@ DROP USER jonathan;
</para>
</para>
</refsect1>
</refsect1>
<refsect1 id="R1-SQL-DROPUSER-3">
<refsect1>
<title>
<title>Compatibility</title>
Compatibility
</title>
<refsect2 id="R2-SQL-DROPUSER-4">
<refsect2info>
<date>1998-09-22</date>
</refsect2info>
<title>
SQL92
</title>
<para>
<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.