Re: Bug with rules in 7.0.3? - Mailing list pgsql-sql

From Tom Lane
Subject Re: Bug with rules in 7.0.3?
Date
Msg-id 2363.981224317@sss.pgh.pa.us
Whole thread Raw
In response to Bug with rules in 7.0.3?  (Tod McQuillin <devin@spamcop.net>)
Responses Re: Bug with rules in 7.0.3?  (Tod McQuillin <devin@spamcop.net>)
List pgsql-sql
Tod McQuillin <devin@spamcop.net> 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


pgsql-sql by date:

Previous
From: Tod McQuillin
Date:
Subject: Bug with rules in 7.0.3?
Next
From: Peter Eisentraut
Date:
Subject: Re: Suggestion for psql: --file -