Re: UPDATE an updatable view - Mailing list pgsql-general

From David Nelson
Subject Re: UPDATE an updatable view
Date
Msg-id CANxyCUEUSZvxwb3zL4jL4xjpULcOuMvrZdYiuOy8arQUXSkp=A@mail.gmail.com
Whole thread Raw
In response to Re: UPDATE an updatable view  (Igor Neyman <ineyman@perceptron.com>)
List 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!

pgsql-general by date:

Previous
From: Igor Neyman
Date:
Subject: Re: UPDATE an updatable view
Next
From: Adrian Klaver
Date:
Subject: Re: Does PLPythonU support COPY table FROM string?