From: | Tino Wildenhain <tino(at)wildenhain(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Joe Conway <mail(at)joeconway(dot)com>, elein <elein(at)varlena(dot)com>, Pavel Stehule <stehule(at)kix(dot)fsv(dot)cvut(dot)cz>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: join of array |
Date: | 2003-08-15 18:52:23 |
Message-ID: | 3F3D2BE7.2090107@wildenhain.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
Hi,
Tom Lane wrote:
> Joe Conway <mail(at)joeconway(dot)com> writes:
>
>>But I was disappointed that this doesn't:
>
>
>>regression=# select ARRAY['{{1,2},{3,4}}'::int[],'{{5,6},{7,8}}'::int[]];
>>ERROR: multidimensional ARRAY[] must be built from nested array expressions
>
>
> Drat, I was assuming that that *would* work.
>
>
>>Should I try to make the second and third cases work?
>
>
> Could you look at how big a change it'd be, anyway? Offhand I think it
> may just mean that the subscript-checking done in parse_expr.c needs to
> be done at runtime instead. Remember parse_expr should only be
> concerned about determining datatype, and for its purposes all arrays of
> a given element type are the same --- subscript checking should happen
> at runtime. (It seems likely that having an ndims field in ArrayExpr
> is inappropriate.)
Wouldn't it be a good idea to just extend the partner arrays? Say
if we concenate array A(Na,..,Xa) || B(Nb,...,Xb)
The resulting array C would be of dimension
C(Na+Nb,max(Oa,Ob),max(Pa,Pb), ... max(Xa,Xb))
So concenation would be an extending and right hand appending (at first
level)
Regards
Tino Wildenhain
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2003-08-15 19:20:18 | Re: Arrays and "goodness" in RDBMSs (was Re: join of |
Previous Message | Tom Lane | 2003-08-15 18:49:41 | Re: [GENERAL] 7.4Beta |
From | Date | Subject | |
---|---|---|---|
Next Message | Ron Johnson | 2003-08-15 19:20:18 | Re: Arrays and "goodness" in RDBMSs (was Re: join of |
Previous Message | Andrew L. Gould | 2003-08-15 18:37:50 | Re: Arrays and "goodness" in RDBMSs (was Re: join of array) |