Re: pg_affected Change Request

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Jan <jan(at)fastpitchcentral(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: pg_affected Change Request
Date: 2005-02-15 00:38:33
Message-ID: 20050215003832.GA31790@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Feb 10, 2005 at 10:31:40AM -0700, Michael Fuhr wrote:
>
> UPDATE tablename SET col1 = <col1value>, col2 = <col2value>, ...
> WHERE keycol = <keyvalue>
> AND (col1 IS DISTINCT FROM <col1value> OR
> col2 IS DISTINCT FROM <col2value> ...)

You could also do this with a trigger. If all columns in the old
and new rows are identical, then the trigger would return NULL to
skip the update for that row.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Davis 2005-02-15 02:15:56 random record from small set
Previous Message Gregory S. Williamson 2005-02-14 23:38:16 Re: Privileges question