diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-01-25 17:09:45 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-01-25 17:09:45 -0500 |
commit | 18c0da88a5d9da566c3bfac444366b73bd0b57da (patch) | |
tree | 9ee280a42d3aa696c896eb3b82c7818578362ff6 /src/backend/optimizer/plan/setrefs.c | |
parent | ff750ce2d82979e9588c629955e161a9379b05f3 (diff) |
Split QTW_EXAMINE_RTES flag into QTW_EXAMINE_RTES_BEFORE/_AFTER.
This change allows callers of query_tree_walker() to choose whether
to visit an RTE before or after visiting the contents of the RTE
(i.e., prefix or postfix tree order). All existing users of
QTW_EXAMINE_RTES want the QTW_EXAMINE_RTES_BEFORE behavior, but
an upcoming patch will want QTW_EXAMINE_RTES_AFTER, and it seems
like a potentially useful change on its own.
Andreas Karlsson (extracted from CTE inlining patch)
Discussion: https://postgr.es/m/8810.1542402910@sss.pgh.pa.us
Diffstat (limited to 'src/backend/optimizer/plan/setrefs.c')
-rw-r--r-- | src/backend/optimizer/plan/setrefs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 5d363edab80..6bd3b2d1ac1 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -340,7 +340,7 @@ flatten_unplanned_rtes(PlannerGlobal *glob, RangeTblEntry *rte) (void) query_tree_walker(rte->subquery, flatten_rtes_walker, (void *) glob, - QTW_EXAMINE_RTES); + QTW_EXAMINE_RTES_BEFORE); } static bool @@ -363,7 +363,7 @@ flatten_rtes_walker(Node *node, PlannerGlobal *glob) return query_tree_walker((Query *) node, flatten_rtes_walker, (void *) glob, - QTW_EXAMINE_RTES); + QTW_EXAMINE_RTES_BEFORE); } return expression_tree_walker(node, flatten_rtes_walker, (void *) glob); |