Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Function: auditor.audit_actor_usr_func()
- -- DROP FUNCTION auditor.audit_actor_usr_func();
- CREATE OR REPLACE FUNCTION auditor.audit_actor_usr_func()
- RETURNS trigger AS
- $BODY$
- BEGIN
- 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 )
- SELECT nextval('auditor.actor_usr_pkey_seq'),
- now(),
- SUBSTR(TG_OP,1,1),
- eg_user,
- eg_ws,
- 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
- FROM auditor.get_audit_info();
- RETURN NULL;
- END;
- $BODY$
- LANGUAGE plpgsql VOLATILE
- COST 100;
- ALTER FUNCTION auditor.audit_actor_usr_func()
- OWNER TO evergreen;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement