+45 70 27 40 08

sales@meeho.net

» PostgreSQL – ERROR: cannot drop the currently open database

Posted by Kasper Tidemann on Wednesday 17th of March 2010 10:35:06 PM

You might come across the following error when trying to drop a database in your PostgreSQL:

ERROR: cannot drop the currently open database

This is because you are trying to delete the database that you are currently connected to (or in MySQL jargon: the database you are current USEing). To fix the problem, try to issue the following command:

\connect postgres

This will connect you to the postgres database in PostgreSQL, sometimes referred to as the maintenance database. From here, try to issue your drop command again – it will now work out for you as expected.

 

If you have something to say, feel free to drop a comment below:

Type in your name here

Type in your e-mail address here

Type in your web site address here

 

+45 70 27 40 08
Open office hours

info@meeho.net

support@meeho.net

News from the Meeho!™ Blog:

02/14 2011 » Fixing the "NoMethodError: undefined method ‘to_sym' for false:FalseClass" error when working with I18n in Ruby on Rails

02/03 2011 » Soon to come: IMAP integration

01/27 2011 » Meeho!™ App version 1.0.3 is out!

01/26 2011 » Cool new iPad stand

We live at Diplomvej 381, 2800 Kgs. Lyngby, Denmark: