Lewis Kapell <lkapell(at)setonhome(dot)org> writes:
> ... psql contains a command \password that can be used
> to safely change a role's password.
FWIW, all that's doing is pre-encrypting the password and sending
ALTER ROLE WITH ENCRYPTED PASSWORD '...';
regards, tom lane