Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries
Дата
Msg-id CAApHDvqL3sJZGgiUZC4s11_wF-dr3dY=EoG2fyCyyJT7kZ5SmA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-bugs
On Fri, 26 Apr 2024 at 03:39, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It'd be easier to review this if you presented it as two independent
> patches, one for HEAD and one for the back branches.

The attached v2 is the same patch as earlier and is intended for <= v16.

> The fact that you had to use a cheesy "eval_const_expressions(NULL,
> ..." call in 0001 demonstrates that it was a mistake to not include
> PlannerInfo in SupportRequestWFuncMonotonic, as every other planner-
> invoked support request has.  I realize that we can't change that
> in back branches, and that it's no longer immediately necessary
> in HEAD either after 0002.  But let's learn from experience and
> add it to the struct while we're here.

The correct PlannerInfo to set here would be the one that the
WindowFunc belongs to.  The problem is that this code is called from
set_subquery_pathlist before the rel->subroot = subquery_planner. i.e
we've no PlannerInfo to set.  Maybe it's worth doing this for
SupportRequestOptimizeWindowClause as a separate patch.

> catversion bumps are not a problem at this stage

The attached v3 is a separate patch for v17 only.

David

Вложения

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

Предыдущее
От: Laurenz Albe
Дата:
Сообщение: Re: edb installation failed for pgadmin when username is Chinese under c;\user #7432
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: edb installation failed for pgadmin when username is Chinese under c;\user #7432