Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
> 2016-10-10 20:56 GMT+02:00 <hcate3(at)gmail(dot)com>:
>> case decimal_9_1
>> when null then 0
>> when decimal_9_1 then 1 end),
> You cannot to compare NULL with NULL in Postgres.
More specifically, you can, but you get a NULL result. "NULL = NULL"
yields NULL, not true. This is per SQL standard.
regards, tom lane