pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Maxim Boguk <maxim.boguk@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
Date: Sun, 04 Dec 2011 22:40:06 -0500
Message-ID: <23718.1323056406@sss.pgh.pa.us> (raw)
In-Reply-To: <CAK-MWwTzG+F0WuL3V4DNKj4Qae8y4sQheYUx+TGqBQ4Kt+jj9A@mail.gmail.com>
References: <E1RXOP2-0002iJ-WB@wrigleys.postgresql.org>
	<23150.1323054358@sss.pgh.pa.us>
	<CAK-MWwTzG+F0WuL3V4DNKj4Qae8y4sQheYUx+TGqBQ4Kt+jj9A@mail.gmail.com>

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



view thread (4+ messages)

Message-ID: <23718.1323056406@sss.pgh.pa.us>
Permalink:  ../23718.1323056406@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/23718.1323056406@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, maxim.boguk@gmail.com
  Subject: Re: BUG #6326: SELECT ARRAY(SELECT ...) syntax and array[] results doesn't work
  In-Reply-To: <23718.1323056406@sss.pgh.pa.us>
  References: <E1RXOP2-0002iJ-WB@wrigleys.postgresql.org> <23150.1323054358@sss.pgh.pa.us> <CAK-MWwTzG+F0WuL3V4DNKj4Qae8y4sQheYUx+TGqBQ4Kt+jj9A@mail.gmail.com> <23718.1323056406@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox