Re: BUG #4040: psql should provide option to not prompt for password

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4040: psql should provide option to not prompt for password
Дата
Msg-id 9362.1205765315@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #4040: psql should provide option to not prompt for password  (Martin Pitt <martin@piware.de>)
Ответы Re: BUG #4040: psql should provide option to not prompt for password  (Martin Pitt <martin@piware.de>)
Список pgsql-bugs
Martin Pitt <martin@piware.de> writes:
>          if (PQstatus(pset.db) == CONNECTION_BAD &&
>              PQconnectionNeedsPassword(pset.db) &&
> -            password == NULL &&
> +            password == NULL && !getenv("PGPASSWORD") &&
>              !feof(stdin))
>          {
>              PQfinish(pset.db);

What exactly do you think that accomplishes?  AFAICS
PQconnectionNeedsPassword can't possibly return true if there was a
password available from PGPASSWORD (regardless of whether it was
correct or not).

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #4040: psql should provide option to not prompt for password
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4040: psql should provide option to not prompt for password