title: PostgreSQL - Python - Trigger - Access to current_user
body: <p>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?</p>
  
  <p>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:</p>
  
  <pre><code>create trigger stock_sys_audit before insert or update or delete on stock_tbl
  FOR EACH ROW EXECUTE PROCEDURE sys_audit(current_user);
  </code></pre>
  
  <p>but it does not work.</p>
  
  <p>Thanks.</p>