Re: [PATCH] Negative Transition Aggregate Functions (WIP)

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: [PATCH] Negative Transition Aggregate Functions (WIP)
Дата
Msg-id CAApHDvpXMXM8d3ufteuWfc7+0Rt_O1D3-NsU8Zs8jMDjdvVLmg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Negative Transition Aggregate Functions (WIP)  (Florian Pflug <fgp@phlo.org>)
Ответы Re: [PATCH] Negative Transition Aggregate Functions (WIP)  (Florian Pflug <fgp@phlo.org>)
Список pgsql-hackers

bool_or()
  FALSE can be removed, removing TRUE requires a rescan. Could be made
  fully invertible by counting the number of TRUE and FALSE values,
  similar to my suggestion for how to handle NaN for sum(numeric).
  Same works for bool_and().

bit_or()
  Like boo_or(), 0 can be removed, everything else requires a rescan.
  Same works for bit_and()


Interesting, I'd not thought of any way to optimise these ones, but I had originally thought about allowing the inverse transition functions to report if they could perform the inverse transition based on the value they received and if they reported failure, then perform the rescan.
I just don't quite know yet the base way for the inverse transition function to communicate this to the caller yet. If you have any ideas on the best way to do this then I'd really like to hear them.

Regards

David Rowley

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)
Следующее
От: Marko Tiikkaja
Дата:
Сообщение: Re: array_length(anyarray)