pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ljb <lbayuk@mindspring.com>
To: pgsql-interfaces@postgresql.org
Subject: Shouldn't .pgpass work with anything which uses libpq?
Date: Mon, 30 Dec 2002 02:44:47 +0000 (UTC)
Message-ID: <auobuv$lc0$1@news.hub.org> (raw)

(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?



view thread (5+ messages)  latest in thread

Message-ID: <auobuv$lc0$1@news.hub.org>
Permalink:  ../auobuv$lc0$1@news.hub.org/
Also on:    postgresql.org/message-id/auobuv$lc0$1@news.hub.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: lbayuk@mindspring.com
  Subject: Re: Shouldn't .pgpass work with anything which uses libpq?
  In-Reply-To: <auobuv$lc0$1@news.hub.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox