Skip site navigation (1) Skip section navigation (2)

Re: BUG #3711: dropdb and creatdb with pgpass.conf file

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: gregory vallet <gvallet(at)fr(dot)abx(dot)fr>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3711: dropdb and creatdb with pgpass.conf file
Date: 2007-10-31 21:38:42
Message-ID: 4728F5E2.6090800@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-bugs
gregory vallet wrote:
> In order to automatized the password on commands like pg_dump, dropdb and
> creatdb, I created a pgpass.conf file with
> "localhost:5432:02HH65:superuser:xxxxxxx"
> 
> With the pg_dump command, it's OK
> with dropdb and creatdb, system asks me for the password.
> 
> If I replace "02HH65" with "*" like "localhost:5432:*:superuser:xxxxxxx",
> it's OK for dropdb and creatdb.
> 
> Why do dropdb and creatdb can't recognize my database name?

createdb and dropdb are different from pg_dump and other commands in 
that it always connects to the "postgres" database (or "template1", if 
you're deleting or creating the postgres database), not your application 
database, to execute the "CREATE DATABASE" or "DROP DATABASE" command.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-10-31 21:47:11
Subject: Re: BUG #3711: dropdb and creatdb with pgpass.conf file
Previous:From: gregory valletDate: 2007-10-31 16:46:30
Subject: BUG #3711: dropdb and creatdb with pgpass.conf file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group