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

From Robert Haas
Subject Re: array_agg and array_accum (patch)
Date
Msg-id 603c8f070811131940n4e71cf4oabdee2154da6b95f@mail.gmail.com
Whole thread Raw
In response to Re: array_agg and array_accum (patch)  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: array_agg and array_accum (patch)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
It looks to me like section 34.10 of the docs might benefit from some
sort of update in light of this patch, since the builtin array_agg now
does the same thing as the proposed user-defined array_accum, only
better.  Presumably we should either pick a different example, or add
a note that a builtin is available that does the same thing more
efficiently.

...Robert

On Thu, Nov 13, 2008 at 11:07 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> Jeff Davis wrote:
>>
>> Here's an updated patch for just array_accum() with some simple docs.
>
> I have committed a "best of Robert Haas and Jeff Davis" array_agg() function
> with standard SQL semantics.  I believe this gives the best consistency with
> other aggregate functions for the no-input-rows case. If some other behavior
> is wanted, it is a coalesce() away, as the documentation states.
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Simple postgresql.conf wizard
Next
From: "Robert Haas"
Date:
Subject: Re: Simple postgresql.conf wizard