Re: Review: listagg aggregate
Pavel Stehule <pavel.stehule@gmail.com>
From: Pavel Stehule <pavel.stehule@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: "David E. Wheeler" <david@kineticode.com>, Peter Eisentraut <peter_e@gmx.net>, Scott Bailey <artacus@comcast.net>, "pgsql-hackers@postgresql.org Hackers" <pgsql-hackers@postgresql.org>
Date: 2010-01-26T14:56:07Z
Lists: pgsql-hackers
2010/1/26 Robert Haas <robertmhaas@gmail.com>: > On Tue, Jan 26, 2010 at 2:14 AM, Pavel Stehule <pavel.stehule@gmail.com> wrote: >> 2010/1/25 Robert Haas <robertmhaas@gmail.com>: >>> On Mon, Jan 25, 2010 at 2:27 PM, David E. Wheeler <david@kineticode.com> wrote: >>>> On Jan 25, 2010, at 2:09 AM, Peter Eisentraut wrote: >>>>> xmlagg -> concatenates values to form xml datum >>>>> array_agg -> concatenates values to form array datum >>>>> ??? -> concatenates values to form string datum >>>> >>>> concat_agg(). >>> >>> I like that one... >> >> why is concat_agg better than listagg ? > > Because it doesn't make lists. > > Honestly, I don't love concat_agg() either - why should something need > to have agg in the name just because it's an aggregate? I think the > most descriptive name would be something like > concatenate_with_separator(), but that's kind of long. This is never ending story :) MySQL has function concate_ws - but this function has different semantic. I thing so string_agg is short, and from one view consistent Pavel > > ...Robert >