2 $PostgreSQL: pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.20 2005/01/04 00:39:53 tgl Exp $
3 PostgreSQL documentation
6 <refentry id="SQL-DROPUSER">
8 <refentrytitle id="SQL-DROPUSER-TITLE">DROP USER</refentrytitle>
9 <refmiscinfo>SQL - Language Statements</refmiscinfo>
13 <refname>DROP USER</refname>
14 <refpurpose>remove a database user account</refpurpose>
17 <indexterm zone="sql-dropuser">
18 <primary>DROP USER</primary>
23 DROP USER <replaceable class="PARAMETER">name</replaceable>
28 <title>Description</title>
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.
38 <title>Parameters</title>
42 <term><replaceable class="PARAMETER">name</replaceable></term>
45 The name of the user to remove.
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.
63 To drop a user who owns a database, first drop the database or change
68 It is unwise to drop a user who either owns any database objects or has any
69 granted permissions on objects. Currently, this is only enforced for
70 the case of owners of databases, but it is likely that future versions of
71 <productname>PostgreSQL</productname> will check other cases.
76 <title>Examples</title>
79 To drop a user account:
87 <title>Compatibility</title>
90 The <command>DROP USER</command> statement is a
91 <productname>PostgreSQL</productname> extension. The SQL standard
92 leaves the definition of users to the implementation.
97 <title>See Also</title>
99 <simplelist type="inline">
100 <member><xref linkend="sql-alteruser" endterm="sql-alteruser-title"></member>
101 <member><xref linkend="sql-createuser" endterm="sql-createuser-title"></member>
107 <!-- Keep this comment at the end of the file
112 sgml-minimize-attributes:nil
113 sgml-always-quote-attributes:t
116 sgml-parent-document:nil
117 sgml-default-dtd-file:"../reference.ced"
118 sgml-exposed-tags:nil
119 sgml-local-catalogs:"/usr/lib/sgml/catalog"
120 sgml-local-ecat-files:nil