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

Do dropdb and createdb read password from .pgpass file?

From: "Sankaran Anupama" <sanupama(at)novell(dot)com>
To: <pgsql-bugs(at)postgresql(dot)org>
Subject: Do dropdb and createdb read password from .pgpass file?
Date: 2005-05-12 05:35:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs

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

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

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.



pgsql-bugs by date

Next:From: raphalaDate: 2005-05-12 08:57:12
Subject: Please help me
Previous:From: Tom LaneDate: 2005-05-12 05:05:06
Subject: Re: Missing tables in postgresql 7.2.4

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