"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