[GENERAL] grant permissions to set variable?

2007-03-14 Thread Vivek Khera
I want to do some debugging on an app, and I'd like to set on a per- connection basis set log_min_duration_statement = 10; Obviously since I'm not super user I get permission denied. Is there some GRANT I can grant to the user in question to allow this? I don't really want to do it

Re: [GENERAL] grant permissions to set variable?

2007-03-14 Thread Richard Huxton
Vivek Khera wrote: I want to do some debugging on an app, and I'd like to set on a per-connection basis set log_min_duration_statement = 10; Obviously since I'm not super user I get permission denied. Is there some GRANT I can grant to the user in question to allow this? I don't really

Re: [GENERAL] grant permissions to set variable?

2007-03-14 Thread Vivek Khera
On Mar 14, 2007, at 11:36 AM, Richard Huxton wrote: Vivek Khera wrote: I want to do some debugging on an app, and I'd like to set on a per-connection basis set log_min_duration_statement = 10; Obviously since I'm not super user I get permission denied. Is there some GRANT I can grant to

Re: [GENERAL] grant permissions to set variable?

2007-03-14 Thread Tom Lane
Vivek Khera [EMAIL PROTECTED] writes: CREATE OR REPLACE FUNCTION setlogtime(integer) RETURNS void AS $$ SET log_min_duration_statement = $1; SHOW log_min_duration_statement; $$ LANGUAGE SQL SECURITY DEFINER; How can I write this function? Use a plpgsql EXECUTE command. In general,