Re: Problem with sequence et rule - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Problem with sequence et rule
Date
Msg-id 9632.1091323709@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem with sequence et rule  (Oliver Elphick <olly@lfix.co.uk>)
Responses Re: Problem with sequence et rule  (Marc Boucher <achernar@gmx.net>)
List pgsql-bugs
Oliver Elphick <olly@lfix.co.uk> writes:
> On Sat, 2004-07-31 at 23:57, Marc Boucher wrote:
>> Now my questions are:
>> - Is this an expected behavior ?

> I couldn't answer that.

It is.  Rules are essentially macros and so you have all the usual
potential gotchas with multiple evaluations of their input arguments.

The recommended way to handle this type of problem is with a trigger
rather than a rule.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: Problem with sequence et rule
Next
From: Kris Jurka
Date:
Subject: Re: 7.5dev assertion failure w/ v3 protocol and transactions