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 f13IImq23882 for ; Sat, 3 Feb 2001 13:18:48 -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 f13IIb902366; Sat, 3 Feb 2001 13:18:37 -0500 (EST) To: Tod McQuillin cc: pgsql-sql@postgresql.org Subject: Re: Bug with rules in 7.0.3? In-reply-to: References: Comments: In-reply-to Tod McQuillin message dated "Sat, 03 Feb 2001 11:09:41 -0600" Date: Sat, 03 Feb 2001 13:18:37 -0500 Message-ID: <2363.981224317@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/22 X-Sequence-Number: 1190 Tod McQuillin writes: > How the heck can one insert and update generate three rows? Looks like a rule rewriter bug to me. It seems to be fixed in 7.1; I get regression=# SELECT * FROM orders; order_id | menu_id | price ----------+---------+------- 1 | 2 | -1 (1 row) which is the correct result given that rules are executed before the original query. (Which is why you need a trigger for this...) regards, tom lane