Holger Jakobs <holger@jakobs.com> writes:
> How come a user who has issued "set role to postgres", so that the
> current user is postgres, cannot connect to a database?
\c makes a fresh connection to the server. SET ROLE in your old
session will not carry over to that (nor any other session state).
regards, tom lane