set_user
set_user copied to clipboard
Implement set_local_user - analog of SET LOCAL ROLE
SET LOCAL ROLE is used for impersonation by PostgREST (and probably other software as well as it is a common pattern to follow where connections are shared - connection pools etc). It is inherently unsafe though because the possibility of RESET ROLE.
It would be great if we had set_user equivalent for the duration of current transaction only.