OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / man / man1 / dropuser.1
1 .\\" auto-generated by docbook2man-spec $Revision: 1.25 $
2 .TH "DROPUSER" "1" "2003-11-02" "Application" "PostgreSQL Client Applications"
3 .SH NAME
4 dropuser \- remove a PostgreSQL user account
5
6 .SH SYNOPSIS
7 .sp
8 \fBdropuser\fR\fR [ \fR\fB\fIoption\fB\fR...\fB \fR\fR]\fR\fR [ \fR\fB\fIusername\fB \fR\fR]\fR
9 .SH "DESCRIPTION"
10 .PP
11 \fBdropuser\fR removes an existing
12 PostgreSQL user
13 \fBand\fR the databases which that user owned.
14 Only superusers (users with usesuper set in
15 the pg_shadow table) can destroy 
16 PostgreSQL users.
17 .PP
18 \fBdropuser\fR is a wrapper around the
19 SQL command DROP USER [\fBdrop_user\fR(7)].
20 There is no effective difference between dropping users via
21 this utility and via other methods for accessing the server.
22 .SH "OPTIONS"
23 .PP
24 \fBdropuser\fR accepts the following command-line arguments:
25 .TP
26 \fB\fIusername\fB\fR
27 Specifies the name of the PostgreSQL user to be removed. 
28 You will be prompted for a name if none is specified on the command line.
29 .TP
30 \fB-e\fR
31 .TP
32 \fB--echo\fR
33 Echo the commands that \fBdropuser\fR generates
34 and sends to the server.
35 .TP
36 \fB-i\fR
37 .TP
38 \fB--interactive\fR
39 Prompt for confirmation before actually removing the user.
40 .TP
41 \fB-q\fR
42 .TP
43 \fB--quiet\fR
44 Do not display a response.
45 .PP
46 .PP
47 \fBdropuser\fR also accepts the following
48 command-line arguments for connection parameters:
49 .TP
50 \fB-h \fIhost\fB\fR
51 .TP
52 \fB--host \fIhost\fB\fR
53 Specifies the host name of the machine on which the 
54 server
55 is running. If the value begins with a slash, it is used 
56 as the directory for the Unix domain socket.
57 .TP
58 \fB-p \fIport\fB\fR
59 .TP
60 \fB--port \fIport\fB\fR
61 Specifies the TCP port or local Unix domain socket file 
62 extension on which the server
63 is listening for connections.
64 .TP
65 \fB-U \fIusername\fB\fR
66 .TP
67 \fB--username \fIusername\fB\fR
68 User name to connect as (not the user name to drop)
69 .TP
70 \fB-W\fR
71 .TP
72 \fB--password\fR
73 Force password prompt (to connect to the server, not for the
74 password of the user to be dropped).
75 .PP
76 .SH "ENVIRONMENT"
77 .TP
78 \fBPGHOST\fR
79 .TP
80 \fBPGPORT\fR
81 .TP
82 \fBPGUSER\fR
83 Default connection parameters
84 .SH "DIAGNOSTICS"
85 .PP
86 In case of difficulty, see DROP USER [\fBdrop_user\fR(7)] and \fBpsql\fR(1) for
87 discussions of potential problems and error messages.
88 The database server must be running at the
89 targeted host. Also, any default connection settings and environment
90 variables used by the \fBlibpq\fR front-end
91 library will apply.
92 .SH "EXAMPLES"
93 .PP
94 To remove user joe from the default database
95 server:
96 .sp
97 .nf
98 $ \fBdropuser joe\fR
99 DROP USER
100 .sp
101 .fi
102 .PP
103 To remove user joe using the server on host
104 eden, port 5000, with verification and a peek at the underlying
105 command:
106 .sp
107 .nf
108 $ \fBdropuser -p 5000 -h eden -i -e joe\fR
109 User "joe" and any owned databases will be permanently deleted.
110 Are you sure? (y/n) \fBy\fR
111 DROP USER "joe"
112 DROP USER
113 .sp
114 .fi
115 .SH "SEE ALSO"
116 \fBcreateuser\fR(1), DROP USER [\fBdrop_user\fR(7)]
117