Drop a database in PostgreSQL

In this article we will learn how to drop a database in PostgreSQL, we will learn how to drop a database using SQL command and using pgAdmin4 as well. Be careful before dropping a database because once you dropped the database you will lose all the complete information stored in the database.

Using DROP DATABASE SQL Command in PostgreSQL

Using this command, we can drop the database. Once you execute this SQL command, you will lose all your data, database structure, tables, schemas, etc. So be careful before dropping any database, make sure that you are leaving the correct database, I suggest that you have to take the backup before leaving the database.


Using pgAdmin4 drop database

Right-click on database-> select Delete/Drop

Related Posts

Fatal Error: Peer authentication failed for user "postgres", when trying to get pgsql working with rails.

Problem: Sometimes, we get the following error when trying to make a connection in Rails.  FATAL ERROR: Peer authentication failed for us...