How to change the password of a user in PostgreSQL

As PostgreSQL documentation, we can update the user using this command syntax:

ALTER USER name [ [ WITH ] option [ ... ] ]

So, if we have a user in named john and we want to update the password, we have to run this command in psql prompt

ALTER USER john WITH PASSWORD 'Password123';

Leave a Reply

Your email address will not be published. Required fields are marked *