I believe the best way to change the password is simply to use:
\password
in the Postgres console.
SourcePer ALTER USER documentation:
Caution must be exercised when specifying an unencrypted password with this command. The password will be transmitted to the server in cleartext, and it might also be logged in the client's command history or the server log. psql contains a command \password that can be used to change a role's password without exposing the cleartext password.
fromNote: https://www.postgresql.org/docs/9.0/static/sql-alterrole.html.ALTER USER is an alias for ALTER ROLE