Artur Zając wrote:
> Is there any reason that „NOT DISTINCT FROM” can’t be autotransformed to „=” 
> when value
> on right side of expression is not NULL or is this any way to use index with 
> „IS NOT DISTINCT FROM” statement?

That would subtly change the semantics of the expression:

test=> SELECT NULL IS NOT DISTINCT FROM 21580;
 ?column? 
----------
 f
(1 row)

test=> SELECT NULL = 21580;
 ?column? 
----------
 
(1 row)

One expression is FALSE, the other NULL.

It doesn't matter in the context of your specific query, but it could matter.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com


Reply via email to