Re: Window function bug

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Window function bug
Дата
Msg-id 12936.1310484039@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Window function bug  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Window function bug  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Window function bug  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-bugs
I wrote:
> ... so I guess the answer is that this code ought to avoid adding Vars that
> are only mentioned within aggregates.

The cleanest way to fix this would involve adding another flag parameter
to flatten_tlist and pull_var_clause.  This is no problem to do in HEAD
or even 9.1, but I'm a bit worried about breaking third-party code if we
backpatch further than that.  So far as I can see, the failure only
occurs if we have a plain (non-grouping) Agg node, which implies that
the user is trying to use windowing functions on a result set that's
guaranteed to contain exactly one aggregated row.  That seems pretty
useless, so I'm thinking it's not worth back-patching a fix for.
Comments?

            regards, tom lane

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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: BUG #6114: Bad path
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Window function bug