Re: .pgpass

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: olly(at)lfix(dot)co(dot)uk
Cc: ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca, pgsql-novice(at)postgresql(dot)org
Subject: Re: .pgpass
Date: 2004-07-04 23:23:43
Message-ID: 13402.1088983423@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> On Sun, 2004-07-04 at 20:41, ghaverla(at)freenet(dot)edmonton(dot)ab(dot)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

In response to

  • Re: .pgpass at 2004-07-04 21:21:10 from Oliver Elphick

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message ghaverla 2004-07-05 01:12:33 Re: .pgpass
Previous Message ghaverla 2004-07-04 21:41:55 Re: .pgpass