Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries
Date
Msg-id 3941551.1714059560@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries
List pgsql-bugs
David Rowley <dgrowleyml@gmail.com> writes:
> I've attached a more complete version of the patch (0002) and another
> patch which is what I'd proposed as a fix for the backbranches (0001).
> Note quite a few tests needed to be adjusted because of disabling this
> optimisation.

IIUC, 0002 is meant to be applied on top of 0001, but it reverses
quite a lot of 0001?  Please don't commit it like that, it'll just
add a lot of useless thrashing to "git blame" results.

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 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 0002 patch will require a cat version bump as it adds a field to
> WindowFunc.  Ideally, I'd be applying this fix to master, but I
> imagine some people might feel we should delay applying a fix like
> this until after we branch for v18. Happy to hear people's views on
> that.

catversion bumps are not a problem at this stage --- we will surely
do at least one more for assigned-OID renumbering.  I'd rather avoid
the git history thrashing implicit in treating 0002 as a follow-on
patch.

            regards, tom lane



pgsql-bugs by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize
Next
From: Tom Lane
Date:
Subject: Re: BUG #17855: Uninitialised memory used when the name type value processed in binary mode of Memoize