Array Madness

Поиск
Список
Период
Сортировка
От Michael Richards
Тема Array Madness
Дата
Msg-id Pine.BSF.4.10.9909132250160.63880-100000@scifair.acadiau.ca
обсуждение исходный текст
Ответы Re: [SQL] Array Madness
Re: [SQL] Array Madness
Список pgsql-sql
Hi.
I've started to fiddle with arrays. Every time I fiddle stuff breaks or
won't work for me :)

It seems that you can't have a NULL value in an array. I think based on
the idea of RDBMSes you should be able to have an array value that is
null... Running an update and setting a single array value to null seems
to nuke the entire array.

create table test(features int4[]);
insert into test values ('{NULL,1}');     
ERROR:  pg_atoi: error in "NULL": can't parse "NULL"
insert into test values ('{0,1}');
insert into test values ('{,1}');
select * from test;
features
--------
{0,1}   
{0,1}   
(2 rows)
update test set features[2]=NULL;
UPDATE 2
select * from test;              
features
--------              
(2 rows)

Positively a bad thing...

-Michael



В списке pgsql-sql по дате отправления:

Предыдущее
От: Michael Richards
Дата:
Сообщение: Re: [SQL] Postgres Table grows very quickly?
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [SQL] Array Madness