Destroying a Database
Destroying a Database
Databases are destroyed with the command sql-dropdatabase:
DROP DATABASE NAME;
You cannot execute the DROP DATABASE command while connected to the victim database. You can, however, be connected to any other database, including the template1 database. template1 would be the only option for dropping the last user database of a given cluster.
For convenience, there is also a shell program to drop databases, app-dropdb:
dropdb DBNAME
createdb, it is not the default action to drop the database with the current user name.)