Re: rule on update

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Gerhard Pfeiffer" <gp(at)bnbt(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: rule on update
Date: 2002-02-05 15:50:08
Message-ID: 24997.1012924208@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Gerhard Pfeiffer" <gp(at)bnbt(dot)de> writes:
> It shouldn't show me this error, because the update invoked by the rule
> doesn't fulfill the condition (new.ent_udate=old.ent_udate).

Rules are macros rewritten at planning time, not at execution time,
so you cannot escape the rewrite cycle with an execution-time condition.

You will probably have better luck doing what you want to do with
a trigger.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-02-05 15:58:24 Re: Server does not reply to Alter Table
Previous Message Tom Lane 2002-02-05 15:44:21 Re: Getting fields in a table through a query?