Re: Rewritten rows on unchanged values - Mailing list pgsql-general

From Chris Angelico
Subject Re: Rewritten rows on unchanged values
Date
Msg-id CAPTjJmoBkd5CoB3vrwJKhAZoMiEDfEPQ=vDGsRKtjsp+oCOXsQ@mail.gmail.com
Whole thread Raw
In response to Re: Rewritten rows on unchanged values  (Bertrand Janin <b@janin.com>)
List pgsql-general
On Sat, Mar 23, 2013 at 1:50 AM, Bertrand Janin <b@janin.com> wrote:
> Tom is right, this would be an optimization for a corner case, I noticed this
> when running a generated script for a batch update that wasn't given a ton of
> attention. The BEFORE UPDATE trigger will work great.

If you know the app, just tweak its one query:

    UPDATE demo
    SET value = some_value
    WHERE id = 1 AND value != some_value;

ChrisA


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: Need advice on best system to choose
Next
From: Misa Simic
Date:
Subject: PostgreSQL and VIEWS