summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas2025-07-16 20:27:26 +0000
committerRobert Haas2025-07-16 20:27:26 +0000
commit89971520de25db158a9267d657c34e61dab109c2 (patch)
tree7aa2d650b62c2e9de42cb750d49ef2044fa8e25c
parentf60fe2cab20fec5df795fc7e5953d6de769bf0cf (diff)
Remove pgpa_fix_scan_or_clump_member.
-rw-r--r--contrib/pg_plan_advice/pgpa_join.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/contrib/pg_plan_advice/pgpa_join.c b/contrib/pg_plan_advice/pgpa_join.c
index dd5c2411ae..1984bd1352 100644
--- a/contrib/pg_plan_advice/pgpa_join.c
+++ b/contrib/pg_plan_advice/pgpa_join.c
@@ -41,8 +41,6 @@ static pgpa_join_strategy pgpa_decompose_join(pgpa_plan_walker_context *walker,
Plan **realinner,
ElidedNode **elidedrealouter,
ElidedNode **elidedrealinner);
-static void pgpa_fix_scan_or_clump_member(PlannedStmt *pstmt,
- pgpa_join_member *member);
static ElidedNode *pgpa_descend_node(PlannedStmt *pstmt, Plan **plan);
static ElidedNode *pgpa_descend_any_gather(PlannedStmt *pstmt, Plan **plan);
static bool pgpa_descend_any_unique(PlannedStmt *pstmt, Plan **plan,
@@ -235,7 +233,8 @@ pgpa_build_unrolled_join(PlannedStmt *pstmt,
/* Handle the outermost join. */
ujoin->outer.plan = join_unroller->outer_subplan;
ujoin->outer.elided_node = join_unroller->outer_elided_node;
- pgpa_fix_scan_or_clump_member(pstmt, &ujoin->outer);
+ ujoin->outer.scan = pgpa_build_scan(pstmt, ujoin->outer.plan,
+ ujoin->outer.elided_node, true);
/*
* We want the joins from the deepest part of the plan tree to appear
@@ -261,7 +260,9 @@ pgpa_build_unrolled_join(PlannedStmt *pstmt,
pgpa_build_unrolled_join(pstmt,
join_unroller->inner_unrollers[k]);
else
- pgpa_fix_scan_or_clump_member(pstmt, &ujoin->inner[i]);
+ ujoin->inner[i].scan = pgpa_build_scan(pstmt, ujoin->inner[i].plan,
+ ujoin->inner[i].elided_node,
+ true);
}
return ujoin;
@@ -467,20 +468,6 @@ pgpa_decompose_join(pgpa_plan_walker_context *walker, Plan *plan,
}
/*
- * Given a pgpa_join_member where the plan node and elided node, if any, have
- * already been set, and where the plan node or elided node represents a
- * clumped join or a scan, fill in the clump_join or rti field of the
- * pgpa_join_member.
- */
-static void
-pgpa_fix_scan_or_clump_member(PlannedStmt *pstmt, pgpa_join_member *member)
-{
- /* XXX remove this function */
- member->scan =
- pgpa_build_scan(pstmt, member->plan, member->elided_node, true);
-}
-
-/*
* Descend through a Plan node in a join tree that the caller has determined
* to be irrelevant.
*