IN query operator and NULL values
| От | Denis Gasparin |
|---|---|
| Тема | IN query operator and NULL values |
| Дата | |
| Msg-id | 482DAAF4.3070201@edistar.com обсуждение исходный текст |
| Ответы |
Re: IN query operator and NULL values
|
| Список | pgsql-general |
Hi all. I have a problem with the IN operator in PostgreSQL 8.2.7. Here it is an example that reproduce the problem: test=# create table test(a integer ,b integer); CREATE TABLE test=# insert into test values(1,1); INSERT 6838415 1 test=# insert into test values(2,2); INSERT 6838416 1 test=# insert into test values(3,null); INSERT 6838417 1 test=# select * from test ; a | b ---+--- 1 | 1 2 | 2 3 | (3 rows) test=# select * from test where b in(1,null); a | b ---+--- 1 | 1 In the last resultset, i was expecting two records the one with b = 1 and the one with b = null. PostgreSQL instead returns only the value with not null values. I tested the example also in PostgreSQL 8.1 and it works correctly (two records). So the question is: what has changed from 8.1 to 8.2? Thank you in advance for your help, Denis
В списке pgsql-general по дате отправления: