PLPGSQL 'SET SESSION ROLE' problems ..

Started by Greg Wickhamover 18 years ago1 messagesgeneral
Jump to latest
#1Greg Wickham
Greg.Wickham@aarnet.edu.au

Hi,

Is it possible to change the current role to another arbitrary role
using a PLPGSQL function?

In essence I've a function "authorise" created by the db superuser with
'SECURITY DEFINER' specificied.

However from within plpgsql the 'superuser' attribute isn't honored when
trying to change roles (ie: the non 'superuser' rules for role change
must be honoured).

Is this a bug?

tnx,

-greg

--