Re: BUG #15961: psql should be able to read password from stdin

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: BUG #15961: psql should be able to read password from stdin
Дата
Msg-id 3ea347a8-ffc6-cab7-1c32-a2311739a511@2ndquadrant.com
обсуждение исходный текст
Ответ на BUG #15961: psql should be able to read password from stdin  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
On 2019-08-16 16:20, PG Bug reporting form wrote:
> I understand why psql does not include a mechanism to pass the password on
> the command-line.  Having worked with and built other similar applications
> at Oracle, I tried to pipe the password into stdin of the psql command like
> so:  
> 
> echo P0stgr3s | psql --username=postgres
> 
> Unfortunately, psql ignores it and prompts me for the password.

The stdin for psql is already used for feeding SQL commands to execute
(e.g., psql < file.sql), so we can't also use it for getting a password.

It might be possible to create a new option to get the password from a
file descriptor (different from stdin), but that's not a feature that
exists today.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #15959: 'DROP EXTENSION pglogical' while an unused logicalreplication slot exists causes slot corruption
Следующее
От: Arthur Zakirov
Дата:
Сообщение: Re: BUG #15961: psql should be able to read password from stdin