BUG #2839: after record with NULL field, query result is wrong

Поиск
Список
Период
Сортировка
От Vladimir
Тема BUG #2839: after record with NULL field, query result is wrong
Дата
Msg-id 200612190456.kBJ4uuf4010495@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2839: after record with NULL field, query result is wrong  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2839
Logged by:          Vladimir
Email address:      dvs@fon.kamchatka.ru
PostgreSQL version: 8.1.3
Operating system:   FreeBSD
Description:        after record with NULL field, query result is wrong
Details:

create table tst (a int[]);
insert into tst values ('{1}'); -- (1)
insert into tst values (null);
insert into tst values ('{2}'); -- (3)
select z.a from tst z where exists (select 1 from
(
select generate_series(1,1) as s,* from (select z.a as arr0) qq
) q
where (q.arr0[q.s] is null)  );
  a
-----

 {2}
(2 rows)

-- What difference between (1) and (3) records?
-- really, my query more complex (auto generated) and table has many
columns, wrong rows return after row where tested field is null

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: No error when FROM is missing in subquery
Следующее
От: "Kevin Macdonald"
Дата:
Сообщение: BUG #2842: Installation procedure