in(NULL)

From: jose <jose(at)sferacarta(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Cc: jose(at)sferacarta(dot)com
Subject: in(NULL)
Date: 2002-05-22 13:38:07
Message-ID: 3CEB9F3F.4080103@sferacarta.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi all,

I think I found a bug using the IN operator.

I have a table t populated as follow:
a | b
---+----
1 | 11
2 | 22
3 | 33
4 | NULL
(4 rows)
select * from t where b in (11,22,NULL);
a | b
---+----
1 | 11
2 | 22
(2 rows)
select * from t where b not in (11,22,NULL);
a | b
---+----
(0 rows)
-----------------------------------------------
I tried the same quesry in mysql and it give me
a different result. Who are right?
select * from t where b not in (11,22,NULL);
+---+---+
| a | b |
+---+---+
| 3 | 33|
+---+---+
1 row in set (0.00 sec)

please reply to jose(at)sferacarta(dot)com
jose

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-05-22 14:12:30 Re: Bug #671: server corrupt
Previous Message pgsql-bugs 2002-05-22 12:41:17 Bug #671: server corrupt