Re: [BUGS] Default values, inserts, and rules... - Mailing list pgsql-general

From Tom Lane
Subject Re: [BUGS] Default values, inserts, and rules...
Date
Msg-id 28863.1029988512@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] Default values, inserts, and rules...  (Sean Chittenden <sean@chittenden.org>)
Responses Re: [BUGS] Default values, inserts, and rules...  (Sean Chittenden <sean@chittenden.org>)
List pgsql-general
Sean Chittenden <sean@chittenden.org> writes:
> ... That said, if things are working correctly in CVS, would you still
> recommend a trigger over a rule?

Yes I would.  I don't think you've thought carefully enough about the
implications of the statement that rules are macros... the perennial
problem with macros is multiple evaluations of an argument, and if the
argument has side-effects (like nextval()) you *will* get bit.

            regards, tom lane

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: lower/upper on latin2 encoding
Next
From: Sean Chittenden
Date:
Subject: Re: [BUGS] Default values, inserts, and rules...