Re: BUG #3937: timestamp null value comparison in subquery using IN/NOT IN - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3937: timestamp null value comparison in subquery using IN/NOT IN
Date
Msg-id 19919.1202340539@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3937: timestamp null value comparison in subquery using IN/NOT IN  ("Jan Mate" <mate@yeea.eu>)
List pgsql-bugs
"Jan Mate" <mate@yeea.eu> writes:
> Comparison between null and timestamp null value is not correct.

No, it's your expectations that are not correct.  Null is not "equal to"
null --- in fact both the queries you show will evaluate the WHERE
clause as null (unknown).

> Is there any other way to compare the subquery result (using IN or NOT IN)
> with null value?

Don't try to use null as a normal data value.  Sooner or later you'll
always regret it.

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Jan Mate"
Date:
Subject: BUG #3937: timestamp null value comparison in subquery using IN/NOT IN
Next
From: ""
Date:
Subject: BUG #3938: Row-wise comparison fails