| From: | Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-bugs(at)postgresql(dot)org |
| Subject: | Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work |
| Date: | 2011-12-05 03:25:17 |
| Message-ID: | CAK-MWwTzG+F0WuL3V4DNKj4Qae8y4sQheYUx+TGqBQ4Kt+jj9A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-bugs |
On Mon, Dec 5, 2011 at 2:05 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> maxim(dot)boguk(at)gmail(dot)com writes:
> > SELECT ARRAY(SELECT ...)
> > doesn't work when subselect return any array.
> > Is that syntax supposed to work with anyarray types?
>
> No.
>
> regards, tom lane
>
Hi.
Thank you very much for answer.
Ok the second problem (possible related to first becuse error is the same):
array_agg doesn't work with anyarray as well:
sports=# select array_agg(val) FROM (SELECT array[1,2]::integer[] as val
UNION ALL SELECT array[3,4]::integer[]) as t;
ERROR: could not find array type for data type integer[]
PS: I try create two-dimentional integer array from query results:
select val1::integer, val2::integer from somequery
to get integer[][] with content like:
[[val1-1,val1-2], [val2-1, val2-2], val[3-1, val3-2]... ]
Is there any way to perform that task it with reasonable efficiency?
--
Maxim Boguk
Senior Postgresql DBA.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2011-12-05 03:40:06 | Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work |
| Previous Message | Tom Lane | 2011-12-05 03:05:58 | Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work |