Re: dropdb weirdness - Mailing list pgsql-general

From Tom Lane
Subject Re: dropdb weirdness
Date
Msg-id 24025.1277845230@sss.pgh.pa.us
Whole thread Raw
In response to Re: dropdb weirdness  (Adrian Klaver <adrian.klaver@gmail.com>)
Responses Re: dropdb weirdness  (Geoffrey <lists@serioustechnology.com>)
List pgsql-general
Adrian Klaver <adrian.klaver@gmail.com> writes:
> On Tuesday 29 June 2010 1:04:27 pm Geoffrey wrote:
>> dropdb: could not connect to database postgres: FATAL:  database
>> "postgres" does not exist
>>
>> Why is it not 'seeing' the database name I'm passing to it?  Why is it
>> trying to drop a database named postgres??

> It needs to connect to the database cluster to run the DROP DATABASE command and
> is trying to use the system database postgres. Did you drop the postgres
> database? Does the user you are connecting as have the permissions to postgres?

"does not exist" is not a permissions problem ;-)

What I'm wondering is if this indicates use of 8.1 or later dropdb
script against a pre-8.1 server.  Before 8.1 there wasn't a postgres
database by default, and dropdb would instead try to connect to
template1.  You can work around this by forcing dropdb to connect to
an existing database name, but it'd probably be better to keep your
client tools in sync with the server version.

            regards, tom lane

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: dropdb weirdness
Next
From: sam mulube
Date:
Subject: Postgresql partitioning - single hot table or distributed