Re: CREATE AGGREGATE array_cat - Mailing list pgsql-hackers

From Tom Lane
Subject Re: CREATE AGGREGATE array_cat
Date
Msg-id 1013938.1605749101@sss.pgh.pa.us
Whole thread Raw
In response to Re: CREATE AGGREGATE array_cat  (Vik Fearing <vik@postgresfriends.org>)
List pgsql-hackers
Vik Fearing <vik@postgresfriends.org> writes:
> On 11/19/20 1:54 AM, Chapman Flack wrote:
>> Would anything have to be written at all, save the CREATE AGGREGATE
>> suggested in the original message, using the existing array_cat as the
>> state transition function?

> Nope.  As my example showed.

But by the same token, anybody who wants that can trivially make it.
I think if we're going to bother, we should strive for an implementation
of efficiency comparable to array_agg, and that will take some bespoke
code.

It might also be worth looking at 9a00f03e4, which addressed the fact
that anyone who had made a custom aggregate depending on array_append
was going to be hurting performance-wise.  The same would be true of
custom aggregates depending on array_cat, and maybe we should try
to alleviate that even if we're providing a new built-in aggregate.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: speaking of CREATE AGGREGATE ...
Next
From: Michael Paquier
Date:
Subject: Re: Sloppiness around failure handling of parsePGArray in pg_dump