Re: UPDATE an updatable view

From: David Nelson <dnelson77808(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: UPDATE an updatable view
Date: 2015-08-28 15:07:41
Message-ID: CANxyCUEUSZvxwb3zL4jL4xjpULcOuMvrZdYiuOy8arQUXSkp=A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Just for the sake of completeness...
>
> If the value (empname in the above example) can be NULL, the compare does
not work, because
>
> SELECT NULL = NULL
>
> returns NULL which is treated as FALSE.
>
> But I am sure you know this :-)
>
>
> HTH,
>
> Ladislav Lenart
>
> ___________________________
>
> Right. And that's why you use very nice option provided by PG:
>
> IF NEW.empname IS DISTINCT FROM OLD.empname THEN
>
> which again you probably know :)
>
> Regards,
> Igor Neyman

Yep, I got there pretty quickiy. IS [NOT] DISTINCT FROM is pretty cool
stuff!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-08-28 15:15:07 Re: Does PLPythonU support COPY table FROM string?
Previous Message David Nelson 2015-08-28 15:03:35 Re: UPDATE an updatable view