"Rodolfo J. Paiz" <rpaiz@simpaticus.com> writes:
> I have learned how to ALTER USER to both set a password and change a
> password. However, I can't seem to *remove* a password.
AFAIR this isn't supported directly. You can get the effect in two ways
though:
1. (language lawyer's way)
ALTER USER luser WITH VALID UNTIL 'yesterday';
The password is still there, but no longer usable.
2. (hacker's way)
UPDATE pg_shadow SET passwd = NULL WHERE usename = 'luser';
This really does reset the password, but it involves more intimacy with
the current system catalog representation than you might like --- ie,
it might possibly break in some future version of Postgres.
regards, tom lane