rikard.pave...@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

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to