SET SESSION AUTHORIZATION superuser limitation. - Mailing list pgsql-hackers

From Dmitry Igrishin
Subject SET SESSION AUTHORIZATION superuser limitation.
Date
Msg-id CAAfz9KO_HBqXZbH90Q5=v+nEsmSBYDDPH0YLnKDHB2pR3LN3iA@mail.gmail.com
Whole thread Raw
Responses Re: SET SESSION AUTHORIZATION superuser limitation.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hackers,

There are feature which may be useful in conjunction with connection pools.
It is the ability to change the session user without creating the new
connection, like this:
(pseudo REPL):
notsuperuser > SELECT current_user, session_user;
notsuperuser notsuperuser
notsuperuser > SET SESSION AUTHORIZATION notsuperuser2 PASSWORD 'password_of_notsuperuser2';
SET SESSION AUTHORIZATION
notsuperuser2 > SELECT current_user, session_user;
notsuperuser2 notsuperuser2
notsuperuser2 > SET ROLE user3;
notsuperuser2 > SELECT current_user, session_user;
user3 notsuperuser2
According to [1], SET SESSION AUTHORIZATION can only be
used by superusers. Is it possible to extend it for use by not only
superusers?


--
// Dmitry.

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: WIP: bloom filter in Hash Joins with batches
Next
From: Tom Lane
Date:
Subject: Re: SET SESSION AUTHORIZATION superuser limitation.