Re: array_agg and array_accum (patch) - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: array_agg and array_accum (patch)
Date
Msg-id 1225433955.1375.136.camel@jdavis
Whole thread Raw
In response to Re: array_agg and array_accum (patch)  ("Robert Haas" <robertmhaas@gmail.com>)
Responses Re: array_agg and array_accum (patch)
List pgsql-hackers
On Wed, 2008-10-29 at 00:08 -0400, Robert Haas wrote:
> It's worth noting that this is the third version of this idea that has
> been submitted.  Ian Caulfield submitted a patch to add this, and so
> did I.  Someone should probably look at all three of them and compare.
> 

If we include a function named array_accum(), it should return an empty
array on no input to match the function in the docs:

http://www.postgresql.org/docs/8.3/static/xaggr.html

Your function returns NULL on no input, which seems more like
array_agg().

Aside from that, I'm pretty open to anything, as long as one of our
patches makes it. If there are potential problems with the standard
(where we don't want to implement a violation), we should just do
array_accum(). If not, we might as well do the standard array_agg(),
perhaps without the ORDER BY clause.

We could also do both, because it is a little annoying to coalesce the
result or array_agg().

Regards,Jeff Davis




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: can we create a record of more than one field?
Next
From: Simon Riggs
Date:
Subject: Re: BufferAccessStrategy for bulk insert