NULL in arrays

From: Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>
To: pgsql-bugs(at)postgresql(dot)org
Subject: NULL in arrays
Date: 2004-01-15 12:59:00
Message-ID: Pine.LNX.4.44.0401151355180.17187-100000@zigo.dhs.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

A person (cross) in the irc channel have found a bug with the new arrays.
Here is what I did to reproduce:

dennis=# CREATE TABLE foo (a int[]);
CREATE TABLE
dennis=# INSERT INTO foo VALUES (ARRAY[2,NULL]);
INSERT 25353 1

That last insert contains a NULL value which are not allowed in arrays and
yet a insert is performed. The table contains a NULL value afterwards
(and no array).

This is something that should be fixed for 7.4.2, so that it gives an
error instead of inserting bad data.

--
/Dennis Björklund

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Dennis Bjorklund 2004-01-15 13:02:46 Re: NULL in arrays
Previous Message Kris Jurka 2004-01-15 11:43:07 Re: ResultSet.getFetchSize()