.pgpass not working?

From: Yang Zhang <yanghatespam(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: .pgpass not working?
Date: 2011-04-09 05:36:34
Message-ID: BANLkTimefuoXp17ns5kOzhMmmtskCvMELQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using the postgresql 8.4.7 in Ubuntu 10.04, and I'm trying to use
.pgpass documented here:

http://www.postgresql.org/docs/8.4/interactive/libpq-pgpass.html

I have a ~/.pgpass with 600 perms containing:

myhostname.com:yang:yang:mypassword

However, it doesn't seem to get picked up by psql -h myhostname.com.
I also tried explicitly specifying PGPASSFILE, but that didn't work.
Neither that env var nor .pgpass is documented in man psql.

Entering my password manually works, however. (Don't need to specify
username/database since they default to my username, which is also
yang.)

Also tried connecting with psycopg2 via sqlalchemy (connect string
"postgresql://myhostname.com/yang"), and it also didn't auto pick up
.pgpass.

Any hints on what's up? Thanks in advance.

Yang

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Yang Zhang 2011-04-09 05:39:44 Re: .pgpass not working?
Previous Message Rob Sargent 2011-04-09 02:38:52 Re: Rename or Re-Create Constraints?