1DROP DATABASE(7)        PostgreSQL 9.2.24 Documentation       DROP DATABASE(7)
2
3
4

NAME

6       DROP_DATABASE - remove a database
7

SYNOPSIS

9       DROP DATABASE [ IF EXISTS ] name
10

DESCRIPTION

12       DROP DATABASE drops a database. It removes the catalog entries for the
13       database and deletes the directory containing the data. It can only be
14       executed by the database owner. Also, it cannot be executed while you
15       or anyone else are connected to the target database. (Connect to
16       postgres or any other database to issue this command.)
17
18       DROP DATABASE cannot be undone. Use it with care!
19

PARAMETERS

21       IF EXISTS
22           Do not throw an error if the database does not exist. A notice is
23           issued in this case.
24
25       name
26           The name of the database to remove.
27

NOTES

29       DROP DATABASE cannot be executed inside a transaction block.
30
31       This command cannot be executed while connected to the target database.
32       Thus, it might be more convenient to use the program dropdb(1) instead,
33       which is a wrapper around this command.
34

COMPATIBILITY

36       There is no DROP DATABASE statement in the SQL standard.
37

SEE ALSO

39       CREATE DATABASE (CREATE_DATABASE(7))
40
41
42
43PostgreSQL 9.2.24                 2017-11-06                  DROP DATABASE(7)
Impressum