Re: Can update triggers detect the column in the update statement?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ben Chobot <bench(at)silentmedia(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Can update triggers detect the column in the update statement?
Date: 2008-10-07 00:53:29
Message-ID: 1723.1223340809@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ben Chobot <bench(at)silentmedia(dot)com> writes:
> Say I have:
> create t (c1 int not null, c2 int);

> Is it possible to create an update trigger on t such updates will only
> be allowed if the update statement explicitly sets c1, even if the new
> value is the same?

No. A trigger can only tell whether the old and new values are the same
or not, not why they are that way.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben Chobot 2008-10-07 01:01:45 Re: Can update triggers detect the column in the update statement?
Previous Message Klint Gore 2008-10-07 00:33:51 Re: feature idea