Re: BUG #18305: Unexpected error: "WindowFunc not found in subplan target lists" triggered by subqueries
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>, zuming.jiang@inf.ethz.ch,
pgsql-bugs@lists.postgresql.org
Date: 2024-04-25T15:39:20Z
Lists: 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
Commits
-
Fix query pullup issue with WindowClause runCondition
- 7d2c7f08d9c5 17.0 landed
-
Make documentation builds reproducible
- b0f0a9432d0b 17.0 cited
-
Teach planner about more monotonic window functions
- 456fa635a909 16.0 cited