Re: seq. DEFAULT values and rules - Mailing list pgsql-general

From Tom Lane
Subject Re: seq. DEFAULT values and rules
Date
Msg-id 7883.1372860890@sss.pgh.pa.us
Whole thread Raw
In response to seq. DEFAULT values and rules  (salah jubeh <s_jubeh@yahoo.com>)
List pgsql-general
salah jubeh <s_jubeh@yahoo.com> writes:
> Is this a bug ?

No, it's a documented, operating-as-designed behavior.  Rules are macros
and therefore have all the usual multiple-evaluation-of-arguments
hazards.

If you just want to propagate data from one table to another, a trigger
is often a better choice, or at least one with fewer surprises.

            regards, tom lane


pgsql-general by date:

Previous
From: salah jubeh
Date:
Subject: seq. DEFAULT values and rules
Next
From: Stuart Ford
Date:
Subject: Re: pg_largeobject.sql script not run after upgrade