Penguin
Annotated edit history of dropdb(1) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 DROPDB
2 !!!DROPDB
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 USAGE
7 ----
8 !!NAME
9
10
11 dropdb - remove a PostgreSQL database
12 !!SYNOPSIS
13
14
15 __dropdb__ [[ ''options''... ]
16 ''dbname''
17
18
19 __INPUTS__
20
21
22 __-h, --host__ ''host''
23
24
25 Specifies the host name of the machine on which the server
26 is running. If host begins with a slash, it is used as the
27 directory for the Unix domain socket.
28
29
30 __-p, --port__ ''port''
31
32
33 Specifies the Internet TCP/IP port or local Unix domain
34 socket file extension on which the server is listening for
35 connections.
36
37
38 __-U, --username__ ''username''
39
40
41 User name to connect as
42
43
44 __-W, --password__
45
46
47 Force password prompt.
48
49
50 __-e, --echo__
51
52
53 Echo the queries that __dropdb__ generates and sends to
54 the server.
55
56
57 __-q, --quiet__
58
59
60 Do not display a response.
61
62
63 __-i, --interactive__
64
65
66 Issues a verification prompt before doing anything
67 destructive.
68
69
70 ''dbname''
71
72
73 Specifies the name of the database to be removed. The
74 database must be one of the existing PostgreSQL databases in
75 this installation.
76
77
78 The options -h, -p, -U, -W, and -e are passed on literally
79 to psql(1).
80
81
82 __OUTPUTS__
83
84
85 __DROP DATABASE__
86
87
88 The database was successfully removed.
89
90
91 __dropdb: Database removal failed.__
92
93
94 Something didn't work out.
95
96
97 If there is an error condition, the backend error message
98 will be displayed. See DROP DATABASE
99 [[__drop_database__(l)] and psql(1) for
100 possibilities.
101 !!DESCRIPTION
102
103
104 __dropdb__ destroys an existing PostgreSQL database. The
105 user who executes this command must be a database superuser
106 or the owner of the database.
107
108
109 __dropdb__ is a shell script wrapper around the SQL
110 command DROP DATABASE [[__drop_database__(l)] via the
111 PostgreSQL interactive terminal psql(1). Thus, there
112 is nothing special about dropping databases via this or
113 other methods. This means that the __psql__ must be found
114 by the script and that a database server is running at the
115 targeted host. Also, any default settings and environment
116 variables available to __psql__ and the __libpq__
117 front-end library do apply.
118 !!USAGE
119
120
121 To destroy the database demo on the default database
122 server:
123
124
125 $ __dropdb demo
126 __DROP DATABASE
127
128
129 To destroy the database demo using the server on host eden,
130 port 5000, with verification and a peek at the underlying
131 query:
132
133
134 $ __dropdb -p 5000 -h eden -i -e demo
135 __Database
136 __y
137 __DROP DATABASE
138 __
139 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.