Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
Date
Msg-id 23718.1323056406@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work  (Maxim Boguk <maxim.boguk@gmail.com>)
List pgsql-bugs
Maxim Boguk <maxim.boguk@gmail.com> writes:
> PS: I try create two-dimentional integer array from  query results:

Well, you could do that with a suitably defined aggregate having the
signature "agg(anyarray) returns anyarray".  But array_agg has the
signature "array_agg(anyelement) returns anyarray" so you can't use
it on an array input.  2-D arrays are not distinct from 1-D arrays
so far as the type system is concerned.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Maxim Boguk
Date:
Subject: Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
Next
From: Noah Misch
Date:
Subject: Re: possible bug seen with -DCLOBBER_CACHE_ALWAYS and changing GUCs