Re: The rule question before, request official documentation on the problem

From: "Stuart Cooper" <stuart(dot)cooper(at)gmail(dot)com>
To: "Chris Travers" <chris(at)metatrontech(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: The rule question before, request official documentation on the problem
Date: 2007-04-11 06:41:06
Message-ID: 7fc8628a0704102341q4d6f4efbj9bfc11a3df4dd224@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> My request at this point is to officially and clearly document this as a
> substantial limitation of rules. It is not obvious that this is how
> rules are supposed to behave in this case, and even assuming that the
> current behavior is desired, it would be nice to let us know this :-)

It's documented.

Section 35.3.1 of Postgresql 8.2 PDF docmentation, 2nd last paragraph:

***
For any reference to NEW, the target list of the original query is searched
for a corresponding entry. If found, that entry's expression replaces the
reference.
***

"expression" is the key term here. NEW.id is an expression, *not* a value.

Cheers,
Stuart.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Travers 2007-04-11 07:02:50 Re: The rule question before, request official documentation on the problem
Previous Message Chris Travers 2007-04-11 06:24:50 The rule question before, request official documentation on the problem