Re: 2 forks for md5?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 2 forks for md5?
Дата
Msg-id 24170.1127359824@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 2 forks for md5?  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: 2 forks for md5?  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Confusion fixed (thanks, Tom). psql (via libpq) tries twice, if not 
> given a password to begin with (via .pgpass or psql's -W).
> Ugly but at least not incomprehensible.

This seems reasonable behavior when prompting for a password from the
user, since that's going to take a lot of time anyway.  I'm not sure
whether libpq should try to excavate a password from ~/.pgpass in
advance of being told by the server that one is needed.

An ideal solution might be to read ~/.pgpass during the bit of code that
handles a password challenge from the server, rather than in the "outer
loop".  Not having looked at the libpq code recently, I have no idea how
painful that would be to do.

Comments?
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 2 forks for md5?
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: feature proposal ...