adding PGPASSWORDFILE to libpq

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема adding PGPASSWORDFILE to libpq
Дата
Msg-id Pine.LNX.4.44.0208090057250.24338-200000@cm-lcon1-46-187.cm.vtr.net
обсуждение исходный текст
Ответы Re: adding PGPASSWORDFILE to libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: adding PGPASSWORDFILE to libpq  (Peter Eisentraut <peter_e@gmx.net>)
Список 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

Вложения

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: stand-alone composite types patch (was [HACKERS] Proposal: stand-alone composite types)
Следующее
От: Gavin Sherry
Дата:
Сообщение: CREATE TEMP TABLE .... ON COMMIT