Re: rule-system revaluates the functionale expressions

From: jan pfaler <jan_pfaler(at)yahoo(dot)se>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: rule-system revaluates the functionale expressions
Date: 2005-01-03 21:16:35
Message-ID: 20050103211635.40397.qmail@web25101.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Thanks Tom,

Refering to your answer: The syntax "NEW.column" seems
to hint rather to "the new value" of column as opposed
to "the expression for the new value", c.f.
"OLD.column". The fact that the order of evaluation
changes underlines the inconsistency; the order of
evaluation would not matter in the former case.

Hence, perhaps a note could be added to the
documentation (did not yet find anything on it)? E.g.
in "34.3. Rules on INSERT, UPDATE, and DELETE" one
could add "Note that NEW.column may be re-evaluated at
a new reference. This causes expressions having
side-effects, notably nextval(), potentially to obtain
differing values at each reference."

Anyhow, postgres (community) deserves at least my
gratitude for its consistency and coherence in
realisation. Thanks you for a quick answer. I will
look into the trigers.

Regards, Jan

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2005-01-04 00:17:58 Re: More SSL questions..
Previous Message Michael Fuhr 2005-01-03 17:56:35 Re: BUG #1370: Problem with arrays in PL/PGSQL