Re: Triggers on columns

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Triggers on columns
Date: 2009-09-07 07:53:57
Message-ID: 1252310037.29289.12.camel@fsopti579.F-Secure.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, 2009-09-07 at 11:20 +0900, Itagaki Takahiro wrote:
> We are discussing how to determine modified columns
> (UPDATE-target vs. changes of actual values), but in the patch
> I used value-based checking. The reasons are:

If you implement a new feature using syntax from the standard, you have
to implement the semantics of the standard. If you don't like the
semantics of the standard, use a different syntax.

> 2. IMHO, almost users don't expect their triggers are not called
> if the actual values are not modified.

Well, as we saw upthread, there can be different valid opinions on this.
But consider the following:

- Statement triggers are called even if the table was not actually
changed in a semantically significant way.

- Row triggers are called even if the row was not actually changed in a
semantically significant way.

Therefore, it cannot be completely unexpected if column triggers are
called even if the column was not actually changed in a semantically
significant way.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2009-09-07 09:36:24 Re: Rename StrNCpy to avoid conflictions on win32
Previous Message Peter Eisentraut 2009-09-07 07:43:45 Re: LATERAL