[GENERAL] PLPGSQL 'SET SESSION ROLE' problems ..

2007-10-14 Thread Greg Wickham
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 rol

Re: [GENERAL] PLPGSQL 'SET SESSION ROLE' problems ..

2007-10-11 Thread Greg Wickham
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED] > To: Greg Wickham > > 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

Re: [GENERAL] PLPGSQL 'SET SESSION ROLE' problems ..

2007-10-10 Thread Tom Lane
"Greg Wickham" <[EMAIL PROTECTED]> 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 super

[GENERAL] PLPGSQL 'SET SESSION ROLE' problems ..

2007-10-10 Thread Greg Wickham
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 rol