Re: .pgpass - Mailing list pgsql-novice

From Tom Lane
Subject Re: .pgpass
Date
Msg-id 13402.1088983423@sss.pgh.pa.us
Whole thread Raw
In response to Re: .pgpass  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-novice
Oliver Elphick <olly@lfix.co.uk> writes:
> On Sun, 2004-07-04 at 20:41, ghaverla@freenet.edmonton.ab.ca wrote:
>> My guess is it is that -X (disallow reading of a .psqlrc file) is
>> somehow turning off the reading of any .pgpass file.

> I can't see how that could be.

I don't believe it either --- libpq will always look for a $HOME/.pgpass
file.

A couple of possibilities that I don't think have been considered yet:

1. Old libpq?  .pgpass is only supported in 7.3 and later.  Even if
your psql is 7.3, I think it might be possible for the dynamic linker
to bind a 7.2 libpq.so to it, if your ldconfig search path is such
that the older libpq.so is found first.

2. Bad permissions on .pgpass?  libpq will silently ignore a .pgpass
file it cannot open for reading.  It will not-so-silently ignore
a .pgpass file that has any group or world permissions.  I'm not
sure if you are capturing stderr from the psql run; if not, it's
possible the latter case is occurring and we're just not seeing
the bleat...

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: .pgpass
Next
From: Oliver Fromme
Date:
Subject: Re: SELECT from two tables... one to many relationship... can postgresql offer anything unique?