Re: Rule Question

From: bricklen <bricklen(at)gmail(dot)com>
To: Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Rule Question
Date: 2013-07-25 15:18:54
Message-ID: CAGrpgQ88rsusupvW7UhKXsqwfKbBz566kbd8Uny0vH5MixMsZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Jul 25, 2013 at 4:18 AM, Giuseppe Broccolo <
giuseppe(dot)broccolo(at)2ndquadrant(dot)it> wrote:

> (TG_OP = 'UPDATE' AND
> (NEW.b != OLD.b OR
> (NEW.b IS NULL AND OLD.b IS NOT NULL) OR
> (NEW.b IS NOT NULL AND OLD.b IS NULL)
> )
> ) THEN
>

Unrelated to the OP's question, the suggestion above could be more simply
rewritten as

TG_OP = 'UPDATE'
AND NEW.b IS DISTINCT FROM OLD.b

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gauthier, Dave 2013-07-25 15:37:40 Re: Why are stored procedures looked on so negatively?
Previous Message Pavel Stehule 2013-07-25 15:14:37 Re: group by query plan on already clustered index