Re: Strict min and max aggregate functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Strict min and max aggregate functions
Дата
Msg-id 10750.1479670661@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Strict min and max aggregate functions  (Jeff Janes <jeff.janes@gmail.com>)
Список pgsql-general
Jeff Janes <jeff.janes@gmail.com> writes:
> On Sun, Nov 20, 2016 at 2:45 AM, Pavel Stehule <pavel.stehule@gmail.com>
> wrote:
>> you can use composite type instead array too.

> I tried a composite type of (flag int, value anyelement) but you can't use
> anyelement in a composite type.  So the aggregate function couldn't be
> polymorphic.  Or, that was my conclusion after making a few attempts. Maybe
> I need to give on polymorphism if I want to get performance?

I would bet on a composite type being as slow or slower than the array
solution.  You could do a quick test with a non-polymorphic definition
just to see, but I doubt it's a promising avenue.

            regards, tom lane


В списке pgsql-general по дате отправления:

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: Strict min and max aggregate functions
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Feature request: separate logging