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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Maxim Boguk <maxim(dot)boguk(at)gmail(dot)com>
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:40:06
Message-ID: 23718.1323056406@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Maxim Boguk <maxim(dot)boguk(at)gmail(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Noah Misch 2011-12-05 06:23:52 Re: possible bug seen with -DCLOBBER_CACHE_ALWAYS and changing GUCs
Previous Message Maxim Boguk 2011-12-05 03:25:17 Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work