Re: psql: default base and password reading

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: psql: default base and password reading
Дата
Msg-id 10217.1002988037@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: psql: default base and password reading  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> The patch uses /dev/tty if it can open it, and stdin if it can't.  It
> does not have a psql flag to force stdin because there is little reason
> to read a password from stdin in any reasonable usage.

If we are reading the password from /dev/tty not stdin, then IMHO the
prompt for the password should be sent to /dev/tty not stderr.

> In fact, I wonder if we should just fail if we need to prompt for a
> password and can't open /dev/tty.  The function is simple_prompt() and
> if we can't open /dev/tty, maybe we should just assume the user typed
> nothing.

Would be okay with me ...

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: psql: default base and password reading
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: psql: default base and password reading