Re: Triggered Data Change check

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Triggered Data Change check
Date: 2001-11-12 04:05:48
Message-ID: 1011.1005537948@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp> writes:
> My point is why we could ignore the (future) changes.

We shouldn't. My feeling is that the various places that consider
HeapTupleSelfUpdated to be an ignorable condition need more thought.
In some cases they should be raising a "data change violation" error,
instead.

It's still not special to triggers, however. If you read the spec
closely, it's talking about any update not only trigger-caused updates:

7) If any attempt is made within an SQL-statement to update some
data item to a value that is distinct from the value to which
that data item was previously updated within the same SQL-
statement, then an exception condition is raised: triggered
data change violation.

It might be that a trigger is the only possible way to make that happen
within SQL92, but we have more ways to make it happen...

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2001-11-12 04:23:02 Re: [patch] helps fe-connect.c handle -EINTR more gracefully
Previous Message Bruce Momjian 2001-11-12 03:57:50 Re: [patch] helps fe-connect.c handle -EINTR more gracefully

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-11-12 05:32:26 Re: Small FK patch to deal with tables without oids
Previous Message Stephan Szabo 2001-11-12 03:54:32 Re: Triggered Data Change check