DROP DATABASE — remove a database
DROP DATABASE [ IF EXISTS ] name
DROP DATABASEdrops a database. It removes the catalog entries for the database and deletes the directory containing the data. It can only be executed by the database owner. Also, it cannot be executed while you or anyone else are connected to the target database. (Connect to
postgresor any other database to issue this command.)
DROP DATABASEcannot be undone. Use it with care!
Do not throw an error if the database does not exist. A notice is issued in this case.
The name of the database to remove.
DROP DATABASEcannot be executed inside a transaction block.
There is no
DROP DATABASEstatement in the SQL standard.