Re: psql - prompt for password

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux