Re: rule system re-evaluates expressions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jan pfaler <jan_pfaler(at)yahoo(dot)se>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: rule system re-evaluates expressions
Date: 2005-01-03 17:40:02
Message-ID: 24605.1104774002@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

jan pfaler <jan_pfaler(at)yahoo(dot)se> writes:
> The rule-system seems to evaluate a functional value
> of a column anew. Please confim if this is a
> documented/intentional behaviour of the rule system?

Yes.

> The order of evaluation of the expresion(s) within
> original statemant and rule differ between "on insert"
> and "on update" rules.

Order of evaluation is never guaranteed.

Generally it's better to use triggers for the sort of problem you show
here.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Fuhr 2005-01-03 17:56:35 Re: BUG #1370: Problem with arrays in PL/PGSQL
Previous Message moje 2005-01-03 15:23:13 Tsearch2 ispell parser unicode bug ?