All,
I am trying to create a basic auditing mechanism using
triggers and would like to create a table that
contains the following information:
audit_operation = TG_OP
audit_username = CURRENT_USER
audit_time = CURRENT_TIMESTAMP
audit_table = TG_RELNAME
audit_key = NEW.key_field (or OLD.key_field)
audit_statement = ??????
How can I get the SQL statement that triggered the
trigger?
Thanks.
Michael