Re: review: More frame options in window functions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: review: More frame options in window functions
Дата
Msg-id 7170.1263682169@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: review: More frame options in window functions  (Hitoshi Harada <umi.tanuki@gmail.com>)
Ответы Re: review: More frame options in window functions
Список pgsql-hackers
Hitoshi Harada <umi.tanuki@gmail.com> writes:
> ... I tried to change not to canonicalize the
> pathkeys in make_pathkeys_window() in such cases and succeeded then
> passed all regression tests.

That's broken, whether it passes regression tests or not.  Not
canonicalizing will mean that you fail to recognize equality to
canonicalized pathkeys, and thus for example execute unnecessary
sorts.

I haven't looked at the patch, but it sounds a bit like you are trying
to put logic into the executor that needs to be in the planner.  If the
executor is guessing about what the planner did, that's a design
failure.  The planner should figure out what needs to happen and tell
the executor exactly what to do, eg, which columns need to be compared
to determine partition membership.
        regards, tom lane


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

Предыдущее
От: Hitoshi Harada
Дата:
Сообщение: Re: review: More frame options in window functions
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Partitioning syntax