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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Vladimir" <dvs(at)fon(dot)kamchatka(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2839: after record with NULL field, query result is wrong
Date: 2006-12-26 19:28:41
Message-ID: 27183.1167161321@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"Vladimir" <dvs(at)fon(dot)kamchatka(dot)ru> writes:
> 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) );

Hmm, surprising this hasn't been found before, because the underlying
bug has been around for a long time :-(. Fix committed --- thanks for
the report!

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message john lyssy 2006-12-26 20:00:23 BUG #2866: cast varchar to decimal failure
Previous Message Tom Lane 2006-12-26 16:57:46 Re: BUG #2836: SPI_execute_plan failed on pl/pgsql function that worked on 8.1