Re: Review: listagg aggregate

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Scott Bailey <artacus(at)comcast(dot)net>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: listagg aggregate
Date: 2010-01-26 18:15:15
Message-ID: 603c8f071001261015g3b5433b0rae899762c2ca4469@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 26, 2010 at 12:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "David E. Wheeler" <david(at)kineticode(dot)com> writes:
>> Because it's an aggregate that cocatenates values. It's not an
>> aggregate that lists things. I also like concat_agg better than
>> string_agg because it's not limited to acting on strings.
>
> But what it *produces* is a string.  For comparison, the
> SQL-standard-specified array_agg produces arrays, but what it
> acts on isn't an array.

This point is well-taken, but naming it string_agg() because it
produces a string doesn't seem quite descriptive enough. We might
someday (if we don't already) have a number of aggregates that produce
an output that is a string; we can't name them all by the output type.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2010-01-26 18:20:26 Re: [COMMITTERS] pgsql: Remove tabs in SGML.
Previous Message David E. Wheeler 2010-01-26 18:14:47 Re: Review: listagg aggregate