Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > b8f4049de69feba5041d49ed4382e582 > files > 535

postgresql-docs-8.0.11-0.1.20060mdk.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>DROP USER</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 8.0.11 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="SQL Commands"
HREF="sql-commands.html"><LINK
REL="PREVIOUS"
TITLE="DROP TYPE"
HREF="sql-droptype.html"><LINK
REL="NEXT"
TITLE="DROP VIEW"
HREF="sql-dropview.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2007-02-02T03:57:22"></HEAD
><BODY
CLASS="REFENTRY"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
>PostgreSQL 8.0.11 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="sql-droptype.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="sql-droptype.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="sql-dropview.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="sql-dropview.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="SQL-DROPUSER"
></A
>DROP USER</H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN42839"
></A
><H2
>Name</H2
>DROP USER&nbsp;--&nbsp;remove a database user account</DIV
><A
NAME="AEN42842"
></A
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN42844"
></A
><H2
>Synopsis</H2
><PRE
CLASS="SYNOPSIS"
>DROP USER <TT
CLASS="REPLACEABLE"
><I
>name</I
></TT
></PRE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN42847"
></A
><H2
>Description</H2
><P
>   <TT
CLASS="COMMAND"
>DROP USER</TT
> removes the specified user.
   It does not remove tables, views, or other objects owned by the user. If the
   user owns any database, an error is raised.
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN42851"
></A
><H2
>Parameters</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="REPLACEABLE"
><I
>name</I
></TT
></DT
><DD
><P
>      The name of the user to remove.
     </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN42859"
></A
><H2
>Notes</H2
><P
>   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> includes a program <A
HREF="app-dropuser.html"
><I
><I
>dropuser</I
></I
></A
> that has the
   same functionality as this command (in fact, it calls this command)
   but can be run from the command shell.
  </P
><P
>   To drop a user who owns a database, first drop the database or change
   its ownership.
  </P
><P
>   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
   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> will check other cases.
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN42867"
></A
><H2
>Examples</H2
><P
>   To drop a user account:
</P><PRE
CLASS="PROGRAMLISTING"
>DROP USER jonathan;</PRE
><P>
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN42871"
></A
><H2
>Compatibility</H2
><P
>   The <TT
CLASS="COMMAND"
>DROP USER</TT
> statement is a
   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> extension.  The SQL standard
   leaves the definition of users to the implementation.
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN42876"
></A
><H2
>See Also</H2
><A
HREF="sql-alteruser.html"
><I
>ALTER USER</I
></A
>, <A
HREF="sql-createuser.html"
><I
>CREATE USER</I
></A
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="sql-droptype.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="sql-dropview.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>DROP TYPE</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="sql-commands.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>DROP VIEW</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>