Re: logging table changes

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Rob Richardson <Rob(dot)Richardson(at)rad-con(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: logging table changes
Date: 2010-09-09 18:37:44
Message-ID: AANLkTi=ofXWpgf4KOO4c_MkzYRLShE60WyS=d6+EUBJH@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Sep 9, 2010 at 10:48 AM, Rob Richardson
<Rob(dot)Richardson(at)rad-con(dot)com> wrote:

>
> If old.value <> new.value then
>        do something
> End if

If old.value IS DISTINCT FROM new.value THEN
--do something
End if

This version will produce expected results when dealing with nulls. I
learned this the hard way.

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Matthias Leopold 2010-09-09 20:54:29 Re: logging table changes
Previous Message Rob Richardson 2010-09-09 18:31:35 Re: logging table changes