From: | "Sankaran Anupama" <sanupama(at)novell(dot)com> |
---|---|
To: | <mike(at)fuhr(dot)org>, <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Do dropdb and createdb read password from .pgpass |
Date: | 2005-05-12 14:24:31 |
Message-ID: | s28312ce.052@lucius.provo.novell.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Thanks for the response.
The following are versions I checked:
postgres, createdb, dropdb, pg_dump and pg_restore - 7.4.7
I did an ldd for each of createdb, dropdb, pg_dump and pg_restore. The
output was - /usr/lib/libpq.so.3 for all of them.
All these have been linked with the same libpq library. So, thinking
wht could be the problem?
-Anu
>>> Michael Fuhr <mike(at)fuhr(dot)org> 05/12/05 6:53 PM >>>
On Wed, May 11, 2005 at 11:35:16PM -0600, Sankaran Anupama wrote:
>
> 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.
Using .pgpass is a behavior of libpq, which underlies utilities
like pg_dump, createdb, and dropdb. If createdb and dropdb are
linked against a libpq from PostgreSQL 7.3 or later, then they
should be using .pgpass. Have you done a process trace or examined
the access time of .pgpass to test your hypothesis that createdb
and dropdb don't use it? Have you used the --version option to
verify that the correct versions of those utilites are being used,
or ldd to see which libpq they're linked against?
createdb and dropdb make connections to template1. Have you checked
pg_hba.conf to see if connecting to template1 is different than
connecting to other databases?
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
---------------------------(end of
broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-05-12 14:41:25 | Re: Missing tables in postgresql 7.2.4 |
Previous Message | Michael Fuhr | 2005-05-12 13:52:08 | Re: BUG #1659: primary key accepts null value |