BUG #3937: timestamp null value comparison in subquery using IN/NOT IN

Поиск
Список
Период
Сортировка
От Jan Mate
Тема BUG #3937: timestamp null value comparison in subquery using IN/NOT IN
Дата
Msg-id 200802062015.m16KFxQo017080@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #3937: timestamp null value comparison in subquery using IN/NOT IN  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      3937
Logged by:          Jan Mate
Email address:      mate@yeea.eu
PostgreSQL version: 8.2.6
Operating system:   Linux & Mac OS X
Description:        timestamp null value comparison in subquery using IN/NOT
IN
Details:

Comparison between null and timestamp null value is not correct.

Try this example:

CREATE TABLE _test ("timestamp" timestamp);
INSERT INTO _test (timestamp) VALUES (null);

SELECT 1 WHERE (null) NOT IN (SELECT * FROM _test);
 ?column?
----------
(0 rows)

SELECT 1 WHERE (null) IN (SELECT * FROM _test);
 ?column?
----------
(0 rows)

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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Vers. 8.3.0: "make check" fails dismally
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3937: timestamp null value comparison in subquery using IN/NOT IN