May 17, 2026, 11:40 PM

This commit is contained in:
Paweł Domański
2026-05-18 06:40:19 +00:00
commit 64944cf004
896 changed files with 310709 additions and 0 deletions
@@ -0,0 +1,21 @@
- Drop database from psql
Note - while dropping a database, you need to connect to a database other than the db you are trying to drop.
postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "localhost" at port "5432".
postgres#drop database "DBACLASS";
-- Drop database using dropdb os utility
postgres$ pwd
/Library/PostgreSQL/10/bin
postgres$ ./dropdb -e "DBACLASS"
Password:
SELECT pg_catalog.set_config('search_path', '', false)
DROP DATABASE "DBACLASS";
For complete article visit - > https://dbaclass.com/article/drop-database-postgres/