Search Postgresql Archives

Re: UPDATE an updatable view

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux