Re: ON UPDATE trigger question - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: ON UPDATE trigger question
Date
Msg-id 20070913080533.GA8894@depesz.com
Whole thread Raw
In response to ON UPDATE trigger question  (Josh Trutwin <josh@trutwins.homeip.net>)
List pgsql-general
On Wed, Sep 12, 2007 at 01:56:13PM -0500, Josh Trutwin wrote:
> Or would you have to compare each field in OLD, NEW to see if
> anything actually changed?

you dont have to compare all columns (at least not in 8.2 and newer).
please take a look at
http://www.depesz.com/index.php/2007/09/08/avoiding-empty-updates/
make sure you'll also read comment from david fetter.

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

pgsql-general by date:

Previous
From: Ottavio Campana
Date:
Subject: get a list of table modifications in a day?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: get a list of table modifications in a day?