Do dropdb and createdb read password from .pgpass file?

From: "Sankaran Anupama" <sanupama(at)novell(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Do dropdb and createdb read password from .pgpass file?
Date: 2005-05-11 05:48:56
Message-ID: s281487d.013@lucius.provo.novell.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm using the pg_dump and pg_restore client applications to implement
our database backup-restore strategies. Wrt this, inorder to be able to
autoamate the backup process (run it as a cron job), I'm using the
.pgpass file for automating the password input. This is working for
pg_dump.

My restore script does a full restore - I first drop the existing
database using dropdb, create a new database using createdb and then use
pg_restore to restore the database from the backup file created (using
pg_dump)

I find that while pg_dump and pg_restore take/read the password from
the .pgpass file, dropdb and createdb do not. For these, i'm still
having to key in the password. The permissions for the .pgpass is 0600
as expected.

Can anyone please let me know why this is happening? Thanks.

-Anu

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2005-05-11 07:22:34 Re: JOIN on set of rows?
Previous Message Dinesh Pandey 2005-05-11 05:47:13 Re: database export in pgsql