Re: hardcode password in connect string
От | Martín Marqués |
---|---|
Тема | Re: hardcode password in connect string |
Дата | |
Msg-id | 4ee7b3cf-bb0d-2131-d37e-ec8f547d0234@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: hardcode password in connect string (Raymond O'Donnell <rod@iol.ie>) |
Список | pgsql-general |
El 15/04/18 a las 12:16, Raymond O'Donnell escribió: > On 15/04/18 12:35, Ricardo Martin Gomez wrote: >> Hello David, >> I think so, the parameter you need in psql command is -w mipassword. > > Sorry, this is not correct. -w causes psql *never* to prompt for a > password, and -W forces a password prompt. Neither allows the password > to be passed as an argument - I don't think that this is possible with > psql. It is possible, you just have to construct the whole string: psql "host=thehost dbname=mydatabase user=memyselfi password=mypassword" Still, the best option, and the most secure, is to use a .pgpass file. The psql invocation with it's password will very likely end in .bash_history and alike. Regards, -- Martín Marqués http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-general по дате отправления: