Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable
Дата
Msg-id 24894.1240628280@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable  (Daniel Grace <dgrace@wingsnw.com>)
Список pgsql-bugs
Daniel Grace <dgrace@wingsnw.com> writes:
> No luck there either (runs, but with incorrect results), but since I know
> this isn't a support list and is a bugs list I just would like to point out
> that: Even though what I was doing that triggered the bug is apparently
> incorrect and 'silly', it's still possible that some complicated legitimate
> query might trigger the same problem -- so it may be worth looking into.

Yes, it's certainly a real bug, and we appreciate the bug report.  My
point is just that the reason it's gone undetected is that it's not a
very useful case in practice; and in particular I don't believe that
it's a case you need to solve your problem.

(To be concrete, the failure case as I understand it is a sub-SELECT
containing an aggregate call containing a sub-sub-SELECT, where the
aggregate call actually belongs to the outermost query level according
to the SQL nesting rules.  This is not what you want because the
aggregation is happening, or would happen except for the planner bug,
with entirely the wrong scope for what you want.)

            regards, tom lane

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

Предыдущее
От: Daniel Grace
Дата:
Сообщение: Re: Query with aggregate over subselects fails with ERROR: plan should not reference subplan's variable
Следующее
От: "Alejandro Oyarce"
Дата:
Сообщение: BUG #4781: Error de Windows Installer