Try doing the two inserts in one rule:

CREATE RULE ... DO INSTEAD
(
INSERT INTO ... ;
INSERT INTO ... ;
);

This is the only way of controlling the order in which the actions will
be done; separate rules will be applied in an undefined order.

                        regards, tom lane

Reply via email to