Re: CREATE AGGREGATE array_cat

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CREATE AGGREGATE array_cat
Дата
Msg-id 1013938.1605749101@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CREATE AGGREGATE array_cat  (Vik Fearing <vik@postgresfriends.org>)
Список 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 по дате отправления:

Предыдущее
От: Chapman Flack
Дата:
Сообщение: speaking of CREATE AGGREGATE ...
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Sloppiness around failure handling of parsePGArray in pg_dump