-- -- ec_templates_audit_tr/0 -- create or replace function ec_templates_audit_tr( ) returns trigger as $$ begin insert into ec_templates_audit ( template_id, template_name, template, last_modified, last_modifying_user, modified_ip_address ) values ( old.template_id, old.template_name, old.template, old.last_modified, old.last_modifying_user, old.modified_ip_address ); return new; end;$$ language plpgsql;