Advertisement
Guest User

Untitled

a guest
Sep 13th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. -- Function: auditor.audit_actor_usr_func()
  2.  
  3. -- DROP FUNCTION auditor.audit_actor_usr_func();
  4.  
  5. CREATE OR REPLACE FUNCTION auditor.audit_actor_usr_func()
  6. RETURNS trigger AS
  7. $BODY$
  8. BEGIN
  9. INSERT INTO auditor.actor_usr_history ( audit_id, audit_time, audit_action, audit_user, audit_ws, id, card, profile, usrname, email, passwd, standing, ident_type, ident_value, ident_type2, ident_value2, net_access_level, photo_url, prefix, first_given_name, second_given_name, family_name, suffix, day_phone, evening_phone, other_phone, mailing_address, billing_address, home_ou, dob, active, master_account, super_user, barred, deleted, usrgroup, claims_returned_count, credit_forward_balance, last_xact_id, alert_message, create_date, expire_date, alias, juvenile, claims_never_checked_out_count, last_update_time )
  10. SELECT nextval('auditor.actor_usr_pkey_seq'),
  11. now(),
  12. SUBSTR(TG_OP,1,1),
  13. eg_user,
  14. eg_ws,
  15. OLD.id, OLD.card, OLD.profile, OLD.usrname, OLD.email, OLD.passwd, OLD.standing, OLD.ident_type, OLD.ident_value, OLD.ident_type2, OLD.ident_value2, OLD.net_access_level, OLD.photo_url, OLD.prefix, OLD.first_given_name, OLD.second_given_name, OLD.family_name, OLD.suffix, OLD.day_phone, OLD.evening_phone, OLD.other_phone, OLD.mailing_address, OLD.billing_address, OLD.home_ou, OLD.dob, OLD.active, OLD.master_account, OLD.super_user, OLD.barred, OLD.deleted, OLD.usrgroup, OLD.claims_returned_count, OLD.credit_forward_balance, OLD.last_xact_id, OLD.alert_message, OLD.create_date, OLD.expire_date, OLD.alias, OLD.juvenile, OLD.claims_never_checked_out_count, OLD.last_update_time
  16. FROM auditor.get_audit_info();
  17. RETURN NULL;
  18. END;
  19. $BODY$
  20. LANGUAGE plpgsql VOLATILE
  21. COST 100;
  22. ALTER FUNCTION auditor.audit_actor_usr_func()
  23. OWNER TO evergreen;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement