Re: patch: bytea_agg - Mailing list pgsql-hackers

From Tom Lane
Subject Re: patch: bytea_agg
Date
Msg-id 11477.1333580376@sss.pgh.pa.us
Whole thread Raw
In response to Re: patch: bytea_agg  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: patch: bytea_agg  (Greg Stark <stark@mit.edu>)
Re: patch: bytea_agg  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> On fre, 2011-12-23 at 19:51 +0200, Peter Eisentraut wrote:
>> On ons, 2011-12-21 at 11:04 +0100, Pavel Stehule wrote:
>>> this patch adds a bytea_agg aggregation.

>> Why not call it string_agg?

> Here is a patch to do the renaming.  As it stands, it fails the
> opr_sanity regression test, because that complains that there are now
> two aggregate functions string_agg with different number of arguments.
> It seems to me that that test should really only complain if the common
> argument types of the two aggregates are the same, correct?

Uh, no.  That test is there for good and sufficient reasons, as per its
comment:

-- Check that there are not aggregates with the same name and different
-- numbers of arguments.  While not technically wrong, we have a project policy
-- to avoid this because it opens the door for confusion in connection with
-- ORDER BY: novices frequently put the ORDER BY in the wrong place.
-- See the fate of the single-argument form of string_agg() for history.

The renaming you propose would only be acceptable to those who have
forgotten that history.  I haven't.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Speed dblink using alternate libpq tuple storage
Next
From: Tom Lane
Date:
Subject: Re: patch: improve SLRU replacement algorithm