Thread: Help writing a trigger function please

Help writing a trigger function please

From
Boris Popov
Date:
Hello pgsql-novice,

I'd like to make 2 functions for 2 triggers to do the following:

CREATE TRIGGER propagade_insert
  AFTER INSERT
  ON originaltable
  FOR EACH ROW
  EXECUTE PROCEDURE propagade_insert();

where propagade_insert() would insert a copy of a row into a different
table say 'targettable' and the revese scenario to remove matching row
from 'targettable' when this row is deleted from 'originaltable'.

Any help will be greatly appreciated!

--
-Boris