From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: select result into string's array
Date: Fri, 9 Oct 2009 09:45:44 +0200
Message-ID: <20091009074544.GB19581@a-kretschmer.de> (raw)
In-Reply-To: <4ACEE6A3.4090901@gmail.com>
References: <4ACEE6A3.4090901@gmail.com>
In response to Alberto Asuero Arroyo :
> Hi,
>
> I need to store the result of select into an array of string:
test=*# select * from foo;
t
------
foo
bar
batz
(3 rows)
test=*# select array_agg(t) from foo;
array_agg
----------------
{foo,bar,batz}
(1 row)
Helps that?
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andreas.kretschmer@schollglas.com
Subject: Re: select result into string's array
In-Reply-To: <20091009074544.GB19581@a-kretschmer.de>
* 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