PostgreSQL – Change user password

Below is the syntax to change a user’s password in postgres database.

ALTER USER username PASSWORD 'newpassword';

You can also encrypt a user’s password as shown below:

ALTER USER username ENCRYPTED PASSWORD 'newpassword';

See also  PostgreSQL - Move table from one schema to another