Sophie

Sophie

distrib > Mandriva > 10.0 > i586 > by-pkgid > db7d48fed1469a51f3fb965d5b5b2ac1 > files > 10

postgresql-docs-7.4.1-2.5.100mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>dropuser</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 7.4.1 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="PostgreSQL Client Applications"
HREF="reference-client.html"><LINK
REL="PREVIOUS"
TITLE="droplang"
HREF="app-droplang.html"><LINK
REL="NEXT"
TITLE="ecpg"
HREF="app-ecpg.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
NAME="creation"
CONTENT="2003-12-22T03:48:47"></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 7.4.1 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="app-droplang.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="app-droplang.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="app-ecpg.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="app-ecpg.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="APP-DROPUSER"
></A
><SPAN
CLASS="APPLICATION"
>dropuser</SPAN
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN44060"
></A
><H2
>Name</H2
>dropuser&nbsp;--&nbsp;remove a <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> user account</DIV
><A
NAME="AEN44064"
></A
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN44066"
></A
><H2
>Synopsis</H2
><P
><TT
CLASS="COMMAND"
>dropuser</TT
> [<VAR
CLASS="REPLACEABLE"
>option</VAR
>...] [<VAR
CLASS="REPLACEABLE"
>username</VAR
>]</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44073"
></A
><H2
>Description</H2
><P
>   <SPAN
CLASS="APPLICATION"
>dropuser</SPAN
> removes an existing
   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> user
   <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>and</I
></SPAN
> the databases which that user owned.
   Only superusers (users with <TT
CLASS="LITERAL"
>usesuper</TT
> set in
   the <TT
CLASS="LITERAL"
>pg_shadow</TT
> table) can destroy 
   <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> users.
  </P
><P
>   <SPAN
CLASS="APPLICATION"
>dropuser</SPAN
> is a wrapper around the
   <ACRONYM
CLASS="ACRONYM"
>SQL</ACRONYM
> command <A
HREF="sql-dropuser.html"
><I
>DROP USER</I
></A
>.
   There is no effective difference between dropping users via
   this utility and via other methods for accessing the server.
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44086"
></A
><H2
>Options</H2
><P
>   <SPAN
CLASS="APPLICATION"
>dropuser</SPAN
> accepts the following command-line arguments:

    <P
></P
></P><DIV
CLASS="VARIABLELIST"
><DL
><DT
><VAR
CLASS="REPLACEABLE"
>username</VAR
></DT
><DD
><P
>	Specifies the name of the <SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> user to be removed. 
	You will be prompted for a name if none is specified on the command line.
       </P
></DD
><DT
><VAR
CLASS="OPTION"
>-e</VAR
><BR><VAR
CLASS="OPTION"
>--echo</VAR
></DT
><DD
><P
>        Echo the commands that <SPAN
CLASS="APPLICATION"
>dropuser</SPAN
> generates
	and sends to the server.
       </P
></DD
><DT
><VAR
CLASS="OPTION"
>-i</VAR
><BR><VAR
CLASS="OPTION"
>--interactive</VAR
></DT
><DD
><P
>        Prompt for confirmation before actually removing the user.
       </P
></DD
><DT
><VAR
CLASS="OPTION"
>-q</VAR
><BR><VAR
CLASS="OPTION"
>--quiet</VAR
></DT
><DD
><P
>        Do not display a response.
       </P
></DD
></DL
></DIV
><P>
  </P
><P
>   <SPAN
CLASS="APPLICATION"
>dropuser</SPAN
> also accepts the following
   command-line arguments for connection parameters:
    
   <P
></P
></P><DIV
CLASS="VARIABLELIST"
><DL
><DT
><VAR
CLASS="OPTION"
>-h <VAR
CLASS="REPLACEABLE"
>host</VAR
></VAR
><BR><VAR
CLASS="OPTION"
>--host <VAR
CLASS="REPLACEABLE"
>host</VAR
></VAR
></DT
><DD
><P
>	Specifies the host name of the machine on which the 
	server
	is running.  If the value begins with a slash, it is used 
	as the directory for the Unix domain socket.
       </P
></DD
><DT
><VAR
CLASS="OPTION"
>-p <VAR
CLASS="REPLACEABLE"
>port</VAR
></VAR
><BR><VAR
CLASS="OPTION"
>--port <VAR
CLASS="REPLACEABLE"
>port</VAR
></VAR
></DT
><DD
><P
>	Specifies the TCP port or local Unix domain socket file 
	extension on which the server
	is listening for connections.
       </P
></DD
><DT
><VAR
CLASS="OPTION"
>-U <VAR
CLASS="REPLACEABLE"
>username</VAR
></VAR
><BR><VAR
CLASS="OPTION"
>--username <VAR
CLASS="REPLACEABLE"
>username</VAR
></VAR
></DT
><DD
><P
>        User name to connect as (not the user name to drop)
       </P
></DD
><DT
><VAR
CLASS="OPTION"
>-W</VAR
><BR><VAR
CLASS="OPTION"
>--password</VAR
></DT
><DD
><P
>        Force password prompt (to connect to the server, not for the
        password of the user to be dropped).
       </P
></DD
></DL
></DIV
><P>
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44156"
></A
><H2
>Environment</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="ENVAR"
>PGHOST</TT
><BR><TT
CLASS="ENVAR"
>PGPORT</TT
><BR><TT
CLASS="ENVAR"
>PGUSER</TT
></DT
><DD
><P
>      Default connection parameters
     </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44168"
></A
><H2
>Diagnostics</H2
><P
>   In case of difficulty, see <A
HREF="sql-dropuser.html"
><I
>DROP USER</I
></A
> and <A
HREF="app-psql.html"
><SPAN
CLASS="APPLICATION"
>psql</SPAN
></A
> for
   discussions of potential problems and error messages.
   The database server must be running at the
   targeted host.  Also, any default connection settings and environment
   variables used by the <SPAN
CLASS="APPLICATION"
>libpq</SPAN
> front-end
   library will apply.
  </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44174"
></A
><H2
>Examples</H2
><P
>    To remove user <TT
CLASS="LITERAL"
>joe</TT
> from the default database
    server:
</P><PRE
CLASS="SCREEN"
><SAMP
CLASS="PROMPT"
>$ </SAMP
><KBD
CLASS="USERINPUT"
>dropuser joe</KBD
>
<SAMP
CLASS="COMPUTEROUTPUT"
>DROP USER</SAMP
></PRE
><P>
   </P
><P
>    To remove user <TT
CLASS="LITERAL"
>joe</TT
> using the server on host
    <TT
CLASS="LITERAL"
>eden</TT
>, port 5000, with verification and a peek at the underlying
    command:
</P><PRE
CLASS="SCREEN"
><SAMP
CLASS="PROMPT"
>$ </SAMP
><KBD
CLASS="USERINPUT"
>dropuser -p 5000 -h eden -i -e joe</KBD
>
<SAMP
CLASS="COMPUTEROUTPUT"
>User "joe" and any owned databases will be permanently deleted.
Are you sure? (y/n) </SAMP
><KBD
CLASS="USERINPUT"
>y</KBD
>
<SAMP
CLASS="COMPUTEROUTPUT"
>DROP USER "joe"
DROP USER</SAMP
></PRE
><P>
   </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44191"
></A
><H2
>See Also</H2
><A
HREF="app-createuser.html"
><SPAN
CLASS="APPLICATION"
>createuser</SPAN
></A
>, <A
HREF="sql-dropuser.html"
><I
>DROP 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="app-droplang.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="app-ecpg.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="APPLICATION"
>droplang</SPAN
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="reference-client.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><SPAN
CLASS="APPLICATION"
>ecpg</SPAN
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>