-- -- ec_sale_prices_audit_tr/0 -- create or replace function ec_sale_prices_audit_tr( ) returns trigger as $$ begin insert into ec_sale_prices_audit ( sale_price_id, product_id, sale_price, sale_begins, sale_ends, sale_name, offer_code, last_modified, last_modifying_user, modified_ip_address ) values ( old.sale_price_id, old.product_id, old.sale_price, old.sale_begins, old.sale_ends, old.sale_name, old.offer_code, old.last_modified, old.last_modifying_user, old.modified_ip_address ); return new; end;$$ language plpgsql;