Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f01JMOL86598 for ; Mon, 1 Jan 2001 14:22:24 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f01JLlC23363; Mon, 1 Jan 2001 14:21:47 -0500 (EST) To: "mdavis@sevainc.com" cc: PostgreSQL-SQL Subject: Re: Updating two table via a Rule? In-reply-to: <01C073A1.ADE7EA80.mdavis@sevainc.com> References: <01C073A1.ADE7EA80.mdavis@sevainc.com> Comments: In-reply-to Michael Davis message dated "Mon, 01 Jan 2001 03:19:37 -0700" Date: Mon, 01 Jan 2001 14:21:47 -0500 Message-ID: <23360.978376907@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200101/4 X-Sequence-Number: 665 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