Re: Function array_agg(array) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Function array_agg(array)
Date
Msg-id 24748.1413041338@sss.pgh.pa.us
Whole thread Raw
In response to Function array_agg(array)  (Ali Akbar <the.apaan@gmail.com>)
Responses Re: Function array_agg(array)
List pgsql-hackers
Ali Akbar <the.apaan@gmail.com> writes:
> So, can't we just set the typarray of array types to its self oid?

Seems dangerous as heck; certainly it would have side-effects far more
wide-ranging than just making this particular function work.

A safer answer is to split array_agg into two functions,array_agg(anynonarray) -> anyarrayarray_agg(anyarray) ->
anyarray

I rather imagine you should do that anyway, because I really doubt
that this hack is operating quite as intended.  I suspect you are
producing arrays containing arrays as elements, not true 2-D arrays.
That's not a direction we want to go in I think; certainly there are
no other operations that produce such things.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Ali Akbar
Date:
Subject: Function array_agg(array)
Next
From: Tom Lane
Date:
Subject: Re: jsonb contains behaviour weirdness