select a list of column values directly into an array - Mailing list pgsql-general

From Gauthier, Dave
Subject select a list of column values directly into an array
Date
Msg-id 482E80323A35A54498B8B70FF2B879800465B3CF95@azsmsx504.amr.corp.intel.com
Whole thread Raw
Responses Re: select a list of column values directly into an array  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: select a list of column values directly into an array  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general

Is there a way to select a list of column values directly into an array?

 

create table foo (col1 text);

insert into foo (col1) values (‘aaa’),(‘bbb’),(‘ccc’),(‘ddd’),(‘eee’);

 

I’d like to load up an array with {aaa,bbb,ccc,ddd,eee}, prefferably with a single select statement.

 

Thanks in advance for any help!

pgsql-general by date:

Previous
From: Ravi Katkar
Date:
Subject: Re: [ODBC] resultset metadata libpq
Next
From: "A. Kretschmer"
Date:
Subject: Re: select a list of column values directly into an array