Re: Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" )

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Eric B(dot) Ridge" <ebr(at)tcdi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" )
Date: 2003-03-13 17:51:48
Message-ID: 7292.1047577908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"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...

> 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.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chad R. Larson 2003-03-13 17:52:43 Re: removal from list
Previous Message Eric B.Ridge 2003-03-13 17:45:52 Re: Views + Rules + Triggers + 7.3.2 = Upgrade Problems (was: Re: REWRITE_INVOKE_MAX and "query may contain cycles" )