Re: Updating - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Updating
Date
Msg-id 200803161714.56619.aklaver@comcast.net
Whole thread Raw
In response to Updating  (Bob Pawley <rjpawley@shaw.ca>)
List pgsql-general
On Sunday 16 March 2008 3:32 pm, Bob Pawley wrote:
> Is there a method available for triggering a function after an update on a
> particular column in a table?
>
> The only way that I have found is to trigger after an update on the whole
> table, which of course can lead to problems.
>
> Bob

I trigger can be constrained to fire for each row. Inside the trigger function
you can test to see if the column in question has been updated and do the
appropriate thing. If the column has not been changed do nothing and RETURN
NEW which makes the function non-op.
--
Adrian Klaver
aklaver@comcast.net

pgsql-general by date:

Previous
From: Bob Pawley
Date:
Subject: Updating
Next
From: Andreas 'ads' Scherbaum
Date:
Subject: Re: Updating