Re: [GENERAL] select a list of column values directly into an array

2010-07-31 Thread Merlin Moncure
On Fri, Jul 30, 2010 at 11:50 AM, Merlin Moncure wrote: > On Fri, Jul 30, 2010 at 10:34 AM, Derrick Rice wrote: >> Is it possible to use the ARRAY(select ...) syntax as a substitute for >> array_agg on versions of postgresql that don't have it? (8.2)  It works >> simply enough when only selecting

Re: [GENERAL] select a list of column values directly into an array

2010-07-30 Thread Merlin Moncure
On Fri, Jul 30, 2010 at 10:34 AM, Derrick Rice wrote: > Is it possible to use the ARRAY(select ...) syntax as a substitute for > array_agg on versions of postgresql that don't have it? (8.2)  It works > simply enough when only selecting a single column, but if I need to group by > some other colum

Re: [GENERAL] select a list of column values directly into an array

2010-07-30 Thread Derrick Rice
Dave > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] select a list of column values directly into an > array > > On Tue, Jul 27, 2010 at 9:03 AM, Gauthier, Dave > wrote: > > Is there a way to select a list of column values directly into an array? > > > >

Re: [GENERAL] select a list of column values directly into an array

2010-07-30 Thread Derrick Rice
al Message- > From: Merlin Moncure [mailto:mmonc...@gmail.com] > Sent: Tuesday, July 27, 2010 9:25 AM > To: Gauthier, Dave > Cc: pgsql-general@postgresql.org > Subject: Re: [GENERAL] select a list of column values directly into an > array > > On Tue, Jul 27, 2010 at 9:03 AM,

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Gauthier, Dave
The select array (select col1 from foo ); ...did it. Thanks! -Original Message- From: Merlin Moncure [mailto:mmonc...@gmail.com] Sent: Tuesday, July 27, 2010 9:25 AM To: Gauthier, Dave Cc: pgsql-general@postgresql.org Subject: Re: [GENERAL] select a list of column values directly

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Merlin Moncure
On Tue, Jul 27, 2010 at 9:03 AM, Gauthier, Dave wrote: > 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}

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Yeb Havinga
A. Kretschmer wrote: In response to Gauthier, Dave : 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}

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread Yeb Havinga
A. Kretschmer wrote: In response to Gauthier, Dave : 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}

Re: [GENERAL] select a list of column values directly into an array

2010-07-27 Thread A. Kretschmer
In response to Gauthier, Dave : > 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}, preff