Skip site navigation (1) Skip section navigation (2)

Re: Review: listagg aggregate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
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:38:37
Message-ID: 16676.1264531117@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Jan 26, 2010 at 12:36 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 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.

True, but the same point could be made against array_agg, and that
didn't stop the committee from choosing that name.  As long as
string_agg is the "most obvious" aggregate-to-string functionality,
which ISTM it is, I think it's all right for it to have pride of place
in naming.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Joe ConwayDate: 2010-01-26 18:43:38
Subject: Re: Patch: libpq new connect function (PQconnectParams)
Previous:From: Robert HaasDate: 2010-01-26 18:35:08
Subject: unfathomable comment in psqlscan.l

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group