Vik Fearing <v...@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