postgres.git / summary / log / commit / refs

commit    4be9024d57330b10d90e723787a83a6de8827b84
Author:   David Rowley <drowley@postgresql.org>
Date:     Thu Sep 25 22:21:30 2025 +0000

    Remove unused parameter from check_and_push_window_quals
    
    ... and find_window_run_conditions.
    
    This seems to have been around and unused ever since the Run Condition
    feature was added in 9d9c02ccd.  Let's remove it to clean things up a
    bit.
    
    Author: Matheus Alcantara <matheusssilv97@gmail.com>
    Discussion: https://postgr.es/m/DD26NJ0Y34ZS.2ZOJPHSY12PFI@gmail.com


src/backend/optimizer/path/allpaths.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 6cc6966b060..132e8a35a39 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -2254,7 +2254,7 @@ set_dummy_rel_pathlist(RelOptInfo *rel) * return false. */ static bool -find_window_run_conditions(Query *subquery, RangeTblEntry *rte, Index rti, +find_window_run_conditions(Query *subquery, RangeTblEntry *rte, AttrNumber attno, WindowFunc *wfunc, OpExpr *opexpr, bool wfunc_left, bool *keep_original, Bitmapset **run_cond_attrs) @@ -2445,8 +2445,8 @@ find_window_run_conditions(Query *subquery, RangeTblEntry *rte, Index rti, * will use the runCondition to stop returning tuples. */ static bool -check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Index rti, - Node *clause, Bitmapset **run_cond_attrs) +check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Node *clause, + Bitmapset **run_cond_attrs) { OpExpr *opexpr = (OpExpr *) clause; bool keep_original = true; @@ -2485,7 +2485,7 @@ check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Index rti, TargetEntry *tle = list_nth(subquery->targetList, var1->varattno - 1); WindowFunc *wfunc = (WindowFunc *) tle->expr; - if (find_window_run_conditions(subquery, rte, rti, tle->resno, wfunc, + if (find_window_run_conditions(subquery, rte, tle->resno, wfunc, opexpr, true, &keep_original, run_cond_attrs)) return keep_original; @@ -2498,7 +2498,7 @@ check_and_push_window_quals(Query *subquery, RangeTblEntry *rte, Index rti, TargetEntry *tle = list_nth(subquery->targetList, var2->varattno - 1); WindowFunc *wfunc = (WindowFunc *) tle->expr; - if (find_window_run_conditions(subquery, rte, rti, tle->resno, wfunc, + if (find_window_run_conditions(subquery, rte, tle->resno, wfunc, opexpr, false, &keep_original, run_cond_attrs)) return keep_original; @@ -2622,7 +2622,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, * runCondition. */ if (!subquery->hasWindowFuncs || - check_and_push_window_quals(subquery, rte, rti, clause, + check_and_push_window_quals(subquery, rte, clause, &run_cond_attrs)) { /* [parent: 76418a0b6762]