Re: Update on tables when the row doesn't change

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: Sebastian Böck <sebastianboeck(at)freenet(dot)de>
Cc: Dawid Kuroczko <qnex42(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Update on tables when the row doesn't change
Date: 2005-05-25 13:34:25
Message-ID: 1117028065.21252.27.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 2005-05-25 at 13:09 +0200, Sebastian Böck wrote:
> Dawid Kuroczko wrote:
>
> >
> > Be wary of the NULL values though. :) Either don't use them, add
> > something like 'AND (text1 <> NEW.text1 OR text1 IS NULL OR NEW.text1
> > IS NULL)' or something more complicated. :)
>
> Thanks for the notice, but I have a special operator for this:
>
> CREATE OR REPLACE FUNCTION different (ANYELEMENT, ANYELEMENT) RETURNS

and then there is the 'IS DISTINCT FROM' construct
http://www.postgresql.org/docs/8.0/static/functions-comparison.html#AEN6094

gnari

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sebastian Böck 2005-05-25 13:48:49 Re: Update on tables when the row doesn't change
Previous Message Michael Fuhr 2005-05-25 12:26:15 Re: plpython error since upgrading from 7.x to 8.x