Re: arrays broken in 7.1.3? also, support for embedded tables present?
От | Tom Lane |
---|---|
Тема | Re: arrays broken in 7.1.3? also, support for embedded tables present? |
Дата | |
Msg-id | 18619.1010642592@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | arrays broken in 7.1.3? also, support for embedded tables present? ("Robby Dermody" <robbyd@robbyd.org>) |
Список | pgsql-bugs |
"Robby Dermody" <robbyd@robbyd.org> writes: > allshotup=# CREATE TABLE foo (bla0 text, bla1 varchar(20)[], bla2 > char(20)[], bla3 text[]); > CREATE > allshotup=# INSERT INTO foo (bla0) VALUES ('test'); > INSERT 19408 1 > allshotup=# UPDATE foo SET bla1[1] = 'bla1', bla2[1] = 'bla2', bla3[1] = > 'bla3' WHERE bla0='test'; > UPDATE 1 > allshotup=# SELECT * FROM foo; > bla0 | bla1 | bla2 | bla3 > ------+------+------+------ > test | | | > (1 row) Right at the moment I don't believe there's any support for assigning into one element of an array that's NULL; the array just stays NULL. This could doubtless be improved, but no one's really stepped up to work on the array code in a long time. It's got lotsa shortcomings besides this one :-( If you feel motivated to work on this, start by looking at ExecEvalArrayRef() in execQual.c. You'd need to hack both it and the arrayfuncs.c routines it calls in order to be smarter about initially-NULL array values. regards, tom lane
В списке pgsql-bugs по дате отправления: