Peter Eisentraut <peter_e@gmx.net> writes:
> I don't see what the problem is of dumping out the entire content of
> pg_shadow into a flat file. First you look for a non-@ user, then you
> look for an @ user that matches the database.
While I'd prefer that approach myself, the way Bruce is proposing does
have a definite advantage: there is no problem with confusion between
global users and database-local users of the same username. "foo@" is
global, "foo" is not.
My own feeling is that the confusion argument is a weak one, and that
not having to use "@" to log in as a global user would be worth having
to avoid duplicating global and local names. But I'm not sufficiently
excited about it to volunteer to do the work ;-)
regards, tom lane