From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Robby Dermody" <robbyd(at)robbyd(dot)org> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: arrays broken in 7.1.3? also, support for embedded tables present? |
Date: | 2002-01-10 06:03:12 |
Message-ID: | 18619.1010642592@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
"Robby Dermody" <robbyd(at)robbyd(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alex Glikson | 2002-01-10 08:31:43 | LIBPQ: program crashed during executing query |
Previous Message | Robby Dermody | 2002-01-10 05:01:40 | arrays broken in 7.1.3? also, support for embedded tables present? |