Drop command will permanently delete database
SYNTAX
DROP DATABASE <databasae_name>
EX:
----LIST DATABASE ---- postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+--------------------+--------------------+----------------------- postgres | postgres | UTF8 | English_India.1252 | English_India.1252 | sachin | postgres | UTF8 | English_India.1252 | English_India.1252 | template0 | postgres | UTF8 | English_India.1252 | English_India.1252 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | English_India.1252 | English_India.1252 | =c/postgres + | | | | | postgres=CTc/postgres (4 rows)
Delete database ‘sachin’ from list of databases
postgres=# drop database sachin;
DROP DATABASE
postgres=# \l List of databases Name | Owner | Encoding | Collate | Ctype | Access privileges -----------+----------+----------+--------------------+--------------------+----------------------- postgres | postgres | UTF8 | English_India.1252 | English_India.1252 | template0 | postgres | UTF8 | English_India.1252 | English_India.1252 | =c/postgres + | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | English_India.1252 | English_India.1252 | =c/postgres + | | | | | postgres=CTc/postgres (3 rows)
sachin database is dropped