Search code examples
sqlpostgresqlsql-drop

Unable to drop database in Postgres


I'm new to databases in general and Postgres in particular. I'm doing something wrong as I'm unable to drop a database.

Command line capture

I've searched for similar issues, but it's always someone that has lost or does not know an id/password. In this case the owner & superuser is postgres but I still can't drop my test databases.

test is an empty database, test_creation is has one table.


Solution

  • You need to connect to psql using following:

    PGPASSWORD=your_password_here psql -h localhost -U your_usename;

    And then try to delete database. For UI you can use any software like pgAdmin III that will be much easier for you because you are new to Postgres