select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Unsupported versions: 7.0
Historical version. PostgreSQL 7.0 reached end of support in May 2005. See the current manual for supported releases.

Destroying a Database

If you are the database administrator for the database mydb, you can destroy it using the following Unix command:

% dropdb dbname
    
This action physically removes all of the Unix files associated with the database and cannot be undone, so this should only be done with a great deal of forethought.

It is also possible to destroy a database from within an SQL session by using

> drop database dbname
    

Report a documentation issue

Read the upstream documentation. For corrections, first check the current manual.