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 ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org