Re: [GENERAL] How to access array element in pgsql after array_agg

2014-06-17 Thread Condor
On 17-06-2014 22:44, François Beausoleil wrote: Le 2014-06-17 à 14:22, Condor a écrit : I do select array_agg(ids) from x; in ids I have int and result is : array_agg - {3843,2,3543,33} I want to access one element or first one direct in sql query like: select arra

Re: [GENERAL] How to access array element in pgsql after array_agg

2014-06-17 Thread François Beausoleil
Le 2014-06-17 à 14:22, Condor a écrit : > I do select array_agg(ids) from x; > in ids I have int and result is : > > array_agg > - >{3843,2,3543,33} > > I want to access one element or first one direct in sql query like: > > select array_agg(ids)[1] from x; > > and

[GENERAL] How to access array element in pgsql after array_agg

2014-06-17 Thread Condor
Hello, I wanna ask how I can access array element in array_agg ? I do select array_agg(ids) from x; in ids I have int and result is : array_agg - {3843,2,3543,33} I want to access one element or first one direct in sql query like: select array_agg(ids)[1] from x;