On Thursday, March 13, 2003, at 12:51 PM, Tom Lane wrote:
> "Eric B. Ridge" <ebr(at)tcdi(dot)com> writes:
>> I would have expected "id" to be '1' in both rows. In fact, for what
>> I'm trying to do, it's a requirement.
>
> Then use a trigger to capture the inserted row...
I was afraid you'd say that.
>> Can anyone explain why NEW.id is being re-evaluated for each statement
>> in the rule? Is this by design?
>
> Because the rule is a macro. Yes, it's by design.
Makes sense, but it's counter-intuitive. Only 1 INSERT is being
issued against the view.
eric