[GENERAL] Re: How to execute 'set session role' from plpgsql function?

2008-08-17 Thread Oleg Vasylenko
Thanks. You suggestion helped me to find a solution! DECLARE ... query text; BEGIN query := query :='SET SESSION ROLE ' || wishedrole; EXECUTE query; .. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscrip

[GENERAL] How to execute 'set session role' from plpgsql function?

2008-08-17 Thread Oleg Vasylenko
Hi,everybody! I wish to have a function with code above, but compiller generate syntactic error at the line "SET SESSION ROLE wishedrole;". How to pass the wishedrole value to the structure? CREATE OR REPLACE FUNCTION f_switch_role(INOUT text,INOUT boolean) AS $BODY$ DECLARE wishedrole ALIA