Advice returning data as an array - Mailing list pgsql-sql

From George Woodring
Subject Advice returning data as an array
Date
Msg-id cfbfcf160908200507q422601c2r3950f5db8a102587@mail.gmail.com
Whole thread Raw
Responses Re: Advice returning data as an array
List pgsql-sql
I have the following query that works the way I need:

SELECT '20090812' AS date, sum(in_oct) AS bytes, sum(in_pkt) AS pkts, 'appl' AS name, ARRAY['appl'] AS fields, CAST((LEAST(src_port, dst_port)) AS varchar) as fieldVal FROM flow_history.flows_20090812 GROUP BY fieldVal ORDER BY bytes DESC LIMIT 20;

My issue is that I need to get the fieldVal  to return as an array and be fieldVal[1].  Any suggestions?

Thanks,
Woody

--
iGLASS Networks
www.iglass.net

pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: Updating one table with data from another
Next
From: Gerardo Herzig
Date:
Subject: using case to select 'which version to use'