adding PGPASSWORDFILE to libpq

From: Alvaro Herrera <alvherre(at)atentus(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: adding PGPASSWORDFILE to libpq
Date: 2002-08-09 05:13:59
Message-ID: Pine.LNX.4.44.0208090057250.24338-200000@cm-lcon1-46-187.cm.vtr.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Hello:

I'm giving a try at some TODO items. Currently it's the turn of the
PGPASSWORDFILE environment variable. I have modified libpq to make use
of this variable. I present the first cut here.

I have some questions:
- should there be some reasonable default non-empty value? If so, how
can I define it? In terms of $HOME?

- should there be a new parameter in the connection string that allows
specifying the file that should be used? A new parameter to
PQsetdbLogin() (breaks old code, I think) ?

- Should I try to use the passwd parameter as password file, and try to
use it as password if it fails to fopen()?

- Should the password be dependent of the database name?

Currently the format for the file should be

host:port:database:user:password

Any [other] comment on how this is done is welcome.

--
Alvaro Herrera (<alvherre[a]atentus.com>)
A male gynecologist is like an auto mechanic who never owned a car.
- Carrie Snow

Attachment Content-Type Size
libpq-pwdfile.patch text/plain 5.0 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Gavin Sherry 2002-08-09 09:22:52 CREATE TEMP TABLE .... ON COMMIT
Previous Message Tom Lane 2002-08-09 03:51:51 Re: stand-alone composite types patch (was [HACKERS] Proposal: stand-alone composite types)