Peter Eisentraut <peter_e@gmx.net> writes:
> concluding that this password is valid for all databases is trivial since
> that's the default setup.
No, I think you're missing the point --- we're concerned about
reconnecting as a different user, not reconnecting to a different
database. The issue is that psql will silently try to use user A's
password to authenticate as user B. While one would hope that this
fails, it doesn't seem like a good idea even to try it.
regards, tom lane