Re: Updating two table via a Rule? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Updating two table via a Rule?
Date
Msg-id 23360.978376907@sss.pgh.pa.us
Whole thread Raw
In response to Updating two table via a Rule?  (Michael Davis <mdavis@sevainc.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Ferruccio Zamuner
Date:
Subject: resetting serials and sequences
Next
From: Tom Lane
Date:
Subject: Re: resetting serials and sequences