-- -- ec_product_comments_audit_tr/0 -- create or replace function ec_product_comments_audit_tr( ) returns trigger as $$ begin insert into ec_product_comments_audit ( comment_id, product_id, user_id, user_comment, one_line_summary, rating, approved_p, last_modified, last_modifying_user, modified_ip_address ) values ( old.comment_id, old.product_id, old.user_id, old.user_comment, old.one_line_summary, old.rating, old.approved_p, old.last_modified, old.last_modifying_user, old.modified_ip_address ); return new; end;$$ language plpgsql;