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

Shouldn't .pgpass work with anything which uses libpq?

From: ljb <lbayuk(at)mindspring(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Shouldn't .pgpass work with anything which uses libpq?
Date: 2002-12-30 02:44:47
Message-ID: auobuv$lc0$ (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
(Using PostgreSQL-7.3.1)

I noticed that the new ~/.pgpass password file works with psql but not with
my pgtclsh scripts, and I'm wondering: shouldn't it work with anything
built on top of libpq?

Digging into it a bit, I think no conninfo-based connection method will use
.pgpass, including libpq PQconnectDB() and libpgtcl "pg_connect -conninfo".
I think it is happening because .pgpass is only read if the password
argument to PQsetdbLogin() is NULL. But if no password is supplied in a
conninfo string, then "DefaultPassword" is used - this is an empty string,
not NULL. Am I right? Is this behavior wrong?


pgsql-interfaces by date

Next:From: Tom LaneDate: 2002-12-30 03:31:36
Subject: Re: Shouldn't .pgpass work with anything which uses libpq?
Previous:From: Tom LaneDate: 2002-12-30 00:38:19
Subject: Re: compiling 7.2.3 with tcl -- tcl.h

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