[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

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

2007-10-10 Thread Greg Wickham
isn't honored when trying to change roles (ie: the non 'superuser' rules for role change must be honoured). Postgresql version 8.2.3 Is this a bug? .. If not, how do I achieve an 'adhoc' change of role from within the "rules system"? tnx, -greg -- Dr. Greg

Re: [GENERAL] Changing session ownership in a web app (or how to peel an onion)

2004-10-15 Thread Greg Wickham
14 AM | To: Greg Wickham | Cc: [EMAIL PROTECTED] | Subject: Re: [GENERAL] Changing session ownership in a web app (or how to peel an onion) | | "Greg Wickham" <[EMAIL PROTECTED]> writes: | > ... (Postgres has strict limitations on usernames which make using | > them for users

[GENERAL] Changing session ownership in a web app (or how to peel an onion)

2004-10-15 Thread Greg Wickham
Hi All, Earlier this year there was a discussion between Tom and Ezra regarding extending 'set session authorization' to facilitate changing the identity of a connection. A synopsis of the discussion is that Tom felt this was bad and the web application should have more responsibility for handl