I am writing an audit trigger in plPython. I cannot figure out how to get access to the current_user variable. Is it available via plpy somehow?
I would also like to know if it is possible to pass variables into a trigger function? If so how is this done? I tried:
create trigger stock_sys_audit before insert or update or delete on stock_tbl
FOR EACH ROW EXECUTE PROCEDURE sys_audit(current_user);
but it does not work.
Thanks.