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

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 (view raw or flat)
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

pgsql-bugs by date

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

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