-- -- ec_categories_audit_tr/0 -- create or replace function ec_categories_audit_tr( ) returns trigger as $$ begin insert into ec_categories_audit ( category_id, category_name, sort_key, last_modified, last_modifying_user, modified_ip_address ) values ( old.category_id, old.category_name, old.sort_key, old.last_modified, old.last_modifying_user, old.modified_ip_address ); return new; end;$$ language plpgsql;