Skip site navigation (1) Skip section navigation (2)

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

From: rikard(dot)pavelic(at)zg(dot)htnet(dot)hr
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #6701: IS NOT NULL doesn't work on complex composites
Date: 2012-06-20 15:53:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged on the website:

Bug reference:      6701
Logged by:          Rikard Pavelic
Email address:      rikard(dot)pavelic(at)zg(dot)htnet(dot)hr
PostgreSQL version: 9.1.3
Operating system:   Windows 7

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;

--Fortunately a workaround
select * from bad where NOT c is null;


pgsql-bugs by date

Next:From: Michael MeskesDate: 2012-06-20 16:02:42
Subject: Re: BUG #6700: Potential Bug in numeric.c
Previous:From: Amit KapilaDate: 2012-06-20 06:33:47
Subject: Re: BUG #6698: sub-query with join producing out of memory in where clause

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group