Re: [HACKERS] is 8.4 array_agg() supposed to work with array values?

2009-01-21 Thread Todd A. Cook
Peter Eisentraut wrote: On Monday 19 January 2009 23:22:21 Todd A. Cook wrote: The docs at http://developer.postgresql.org/pgdocs/postgres/functions-aggregate.html don't prohibit using array values with array_arg(), so I assumed that it would work. test=> select array_agg(v.a) from (values (a

Re: [HACKERS] is 8.4 array_agg() supposed to work with array values?

2009-01-20 Thread Peter Eisentraut
On Tuesday 20 January 2009 18:09:51 Merlin Moncure wrote: > On 1/20/09, Peter Eisentraut wrote: > > integer[] is "array of integer", in the way C deals with arrays. This > > is also a main reason why composite types and arrays don't mix > > orthogonally; there is no way to represent that in the

Re: [HACKERS] is 8.4 array_agg() supposed to work with array values?

2009-01-20 Thread Merlin Moncure
On 1/20/09, Peter Eisentraut wrote: > integer[] is "array of integer", in the way C deals with arrays. This is > also a main reason why composite types and arrays don't mix orthogonally; > there is no way to represent that in the system catalogs. What do you mean by this exactly? We've had a

Re: [HACKERS] is 8.4 array_agg() supposed to work with array values?

2009-01-20 Thread Greg Stark
On Tue, Jan 20, 2009 at 5:09 AM, Peter Eisentraut wrote: > This would work much > better if integer[][] where "array of integer[]", in the same way as > integer[] is "array of integer", in the way C deals with arrays. Well the situation in C is substantially more complicated than you make out. I

Re: [HACKERS] is 8.4 array_agg() supposed to work with array values?

2009-01-19 Thread Peter Eisentraut
On Monday 19 January 2009 23:22:21 Todd A. Cook wrote: > The docs at > http://developer.postgresql.org/pgdocs/postgres/functions-aggregate.html > don't prohibit using array values with array_arg(), so I assumed that it > would work. > test=> select array_agg(v.a) from (values (array[1,2]), (array[