share parent TRIGGER between INHERITS childs Postgresql 9 -
create table parent(...); create table child1(...) inherits parent; create table child2(...) inherits parent; create table child3(...) inherits parent;
i want create trigger 'parent' , when insert on child1 or child2 or child3 trigger must automatically executed. seems didn't work, must create trigger each child. solution postgresql 9 ?
you need trigger each child table.
the maintenance burden mitigated fact triggers can point same function:
create trigger trig1 after insert on child1 each row execute procedure trigproc(); create trigger trig2 after insert on child2 each row execute procedure trigproc(); ...
Comments
Post a Comment