aboutsummaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/equivclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path/equivclass.c')
-rw-r--r--src/backend/optimizer/path/equivclass.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c
index a36d0c9fcf3..d9a65eba35d 100644
--- a/src/backend/optimizer/path/equivclass.c
+++ b/src/backend/optimizer/path/equivclass.c
@@ -1999,48 +1999,6 @@ add_child_rel_equivalences(PlannerInfo *root,
/*
- * mutate_eclass_expressions
- * Apply an expression tree mutator to all expressions stored in
- * equivalence classes (but ignore child exprs unless include_child_exprs).
- *
- * This is a bit of a hack ... it's currently needed only by planagg.c,
- * which needs to do a global search-and-replace of MIN/MAX Aggrefs
- * after eclasses are already set up. Without changing the eclasses too,
- * subsequent matching of ORDER BY and DISTINCT clauses would fail.
- *
- * Note that we assume the mutation won't affect relation membership or any
- * other properties we keep track of (which is a bit bogus, but by the time
- * planagg.c runs, it no longer matters). Also we must be called in the
- * main planner memory context.
- */
-void
-mutate_eclass_expressions(PlannerInfo *root,
- Node *(*mutator) (),
- void *context,
- bool include_child_exprs)
-{
- ListCell *lc1;
-
- foreach(lc1, root->eq_classes)
- {
- EquivalenceClass *cur_ec = (EquivalenceClass *) lfirst(lc1);
- ListCell *lc2;
-
- foreach(lc2, cur_ec->ec_members)
- {
- EquivalenceMember *cur_em = (EquivalenceMember *) lfirst(lc2);
-
- if (cur_em->em_is_child && !include_child_exprs)
- continue; /* ignore children unless requested */
-
- cur_em->em_expr = (Expr *)
- mutator((Node *) cur_em->em_expr, context);
- }
- }
-}
-
-
-/*
* generate_implied_equalities_for_column
* Create EC-derived joinclauses usable with a specific column.
*