Re: psql - prompt for password

Поиск
Список
Период
Сортировка
От Erik Wienhold
Тема Re: psql - prompt for password
Дата
Msg-id 822d3df1-9ec9-4cbb-922a-c7ac0cff424d@ewie.name
обсуждение исходный текст
Ответ на psql - prompt for password  (Edwin UY <edwin.uy@gmail.com>)
Список pgsql-admin
On 2024-05-30 10:07 +0200, Edwin UY wrote:
> Is createuser the only one I can use to create a user where it prompts for
> a password? There is no alteruser though.
> I want to use psql and \prompt but am lost on how to use it.
> Basically just want to use it for running a psql script like for example -
> ALTER USER spongebob WITH ENCRYPTED PASSWORD ':newpassword';

Or use \password which has the benefit of not leaking the plaintext
password into the logs which would be the case if there's an error in
the ALTER USER command.

    psql -c '\password spongebob'

-- 
Erik



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

Предыдущее
От: Kashif Zeeshan
Дата:
Сообщение: Re: psql - prompt for password
Следующее
От: Mohan NBSPS
Дата:
Сообщение: Re: Postgresql 9.5: Streaming Replication: Secondaries Fail To Start Post WAL Error