Re: BUG #6701: IS NOT NULL doesn't work on complex composites

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6701: IS NOT NULL doesn't work on complex composites
Дата
Msg-id 2782.1340219454@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #6701: IS NOT NULL doesn't work on complex composites  (rikard.pavelic@zg.htnet.hr)
Ответы Re: BUG #6701: IS NOT NULL doesn't work on complex composites  (Rikard Pavelic <rikard.pavelic@zg.htnet.hr>)
Список pgsql-bugs
rikard.pavelic@zg.htnet.hr writes:
> create type t AS (i int);
> create type complex as (t t, i int);
> create table bad(i int, c complex);

> insert into bad values(1, null);
> insert into bad values(1, ROW(null, 2));
> insert into bad values(1, ROW(ROW(1), 2));

> select * from bad;
> select * from bad where c is null;

> --This doesn't work as expected
> select * from bad where c is not null;

What do you consider to be "expected"?  Have you read the documentation
where it points out that IS NULL and IS NOT NULL are not inverses for
composite values?
http://www.postgresql.org/docs/9.1/static/functions-comparison.html

(I'm not that thrilled with this behavior either, but it is per SQL
standard AFAICT.)

            regards, tom lane

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #6701: IS NOT NULL doesn't work on complex composites
Следующее
От: Rikard Pavelic
Дата:
Сообщение: Re: BUG #6701: IS NOT NULL doesn't work on complex composites