Re: select result into string's array

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: select result into string's array
Date: 2009-10-09 07:45:44
Message-ID: 20091009074544.GB19581@a-kretschmer.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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)

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dmitriy Igrishin 2009-10-09 08:31:24 Re: select result into string's array
Previous Message Alberto Asuero Arroyo 2009-10-09 07:30:43 select result into string's array