Skip to content

Instantly share code, notes, and snippets.

Created June 18, 2020 18:39
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Trigger for insert into logging table
create function address_trigger_function()
returns trigger as $$
insert into logging_address_address (address_id, type, street1, street2, street3, street4, city, po_box_code, phone_number, date_created, operation)
values (old.address_id, old.type, old.street1,old.street2,old.street3,old.street4,,old.po_box_code,old.phone_number, old.date_created,TG_OP);
$$ LANGUAGE plpgsql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment