Re: seq. DEFAULT values and rules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: salah jubeh <s_jubeh(at)yahoo(dot)com>
Cc: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: seq. DEFAULT values and rules
Date: 2013-07-03 14:14:50
Message-ID: 7883.1372860890@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

salah jubeh <s_jubeh(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stuart Ford 2013-07-03 14:59:30 Re: pg_largeobject.sql script not run after upgrade
Previous Message salah jubeh 2013-07-03 13:56:26 seq. DEFAULT values and rules