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)
Список
Дерево обсуждения
BUG #15961: psql should be able to read password from stdin PG Bug reporting form <noreply@postgresql.org>
Re: BUG #15961: psql should be able to read password from stdin Arthur Zakirov <a.zakirov@postgrespro.ru>
Re: BUG #15961: psql should be able to read password from stdin Georg Sauthoff <mail@gms.tf>
Re: BUG #15961: psql should be able to read password from stdin Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #15961: psql should be able to read password from stdin Thomas Kellerer <spam_eater@gmx.net>
Re: BUG #15961: psql should be able to read password from stdin Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
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
Дата:
От: Arthur Zakirov
Дата: