From: Robert Haas Date: Wed, 16 Jul 2025 20:27:26 +0000 (-0400) Subject: Remove pgpa_fix_scan_or_clump_member. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=89971520de25db158a9267d657c34e61dab109c2;p=users%2Frhaas%2Fpostgres.git Remove pgpa_fix_scan_or_clump_member. --- 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; @@ -466,20 +467,6 @@ pgpa_decompose_join(pgpa_plan_walker_context *walker, Plan *plan, return strategy; } -/* - * 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.