sql-manager

Deleted database still shows in database list in PostgreSQL SQLmanager


Using PostgreSQL 9.4.12, I created a new database called new_db and before adding any table or any other object to it and probably before registering it (I don't remember if I've registered or not), I dropped it. Now, it still shows in database list in SQLmanager:

enter image description here

and when I attempt to drop it via following query:

drop database new_db;

it says:

database doesn't exist 

But when I open 'database registration manager', it lists 'new_db' and shows the register check box as marked: enter image description here

and when I try to remove the mark and apply the changes it displays an error that isn't relevant to the 'new_db' database.

enter image description here

Following query also results 0 rows:

select oid, * from pg_database where datname like
   'new_db';

How can I remove the database from the list in SQLmanager?


Solution

  • SQL Manager creates new_db (asdefault anme) on first connection. After that it registers it. If you just drop database and don't unregister it the "alias" remains. You have to right click on new_db and "unregister database"