Skip site navigation (1) Skip section navigation (2)

Re: Default values, inserts, and rules...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: Default values, inserts, and rules...
Date: 2002-08-22 03:55:12
Message-ID: 28863.1029988512@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-general
Sean Chittenden <sean(at)chittenden(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Sean ChittendenDate: 2002-08-22 04:41:49
Subject: Re: Default values, inserts, and rules...
Previous:From: Sean ChittendenDate: 2002-08-21 17:07:10
Subject: Re: Default values, inserts, and rules...

pgsql-general by date

Next:From: Sean ChittendenDate: 2002-08-22 04:41:49
Subject: Re: Default values, inserts, and rules...
Previous:From: Bruce MomjianDate: 2002-08-22 03:23:51
Subject: Re: [HACKERS] [GENERAL] workaround for lack of REPLACE()

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group