Re: PLPGSQL 'SET SESSION ROLE' problems .. - Mailing list pgsql-general

From Tom Lane
Subject Re: PLPGSQL 'SET SESSION ROLE' problems ..
Date
Msg-id 3344.1192077454@sss.pgh.pa.us
Whole thread Raw
In response to PLPGSQL 'SET SESSION ROLE' problems ..  ("Greg Wickham" <Greg.Wickham@aarnet.edu.au>)
List pgsql-general
"Greg Wickham" <Greg.Wickham@aarnet.edu.au> writes:
> Is it possible to change the current role to another arbitrary role
> using a PLPGSQL function?

Yes.

> However from within plpgsql the 'superuser' attribute isn't honored when
> trying to change roles

IIRC we deliberately restrict inheritance of superuser status.  If you
want to argue there's a bug here you need to provide specific details of
what you did, as well as an argument why superuser status should be more
laxly controlled.

            regards, tom lane

pgsql-general by date:

Previous
From: "Greg Wickham"
Date:
Subject: PLPGSQL 'SET SESSION ROLE' problems ..
Next
From: "Manish Jain"
Date:
Subject: Not able to insert binary Data having NULL