Hiroshi Inoue <Inoue@tpf.co.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
distinctfrom 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