diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-19 07:03:34 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-02-19 07:03:34 +0000 |
commit | 7c5e5439d2a64ee82d54be2e064a4bb4602bad30 (patch) | |
tree | da8d85b50e284413823da3bc98975c03278cb582 /src/backend/optimizer/prep/prepunion.c | |
parent | 90c301aaa9377d385d00d93462f3f656ada8981e (diff) | |
download | postgresql-7c5e5439d2a64ee82d54be2e064a4bb4602bad30.tar.gz postgresql-7c5e5439d2a64ee82d54be2e064a4bb4602bad30.zip |
Get rid of some old and crufty global variables in the planner. When
this code was last gone over, there wasn't really any alternative to
globals because we didn't have the PlannerInfo struct being passed all
through the planner code. Now that we do, we can restructure things
to avoid non-reentrancy. I'm fooling with this because otherwise I'd
have had to add another global variable for the planned compact
range table list.
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
-rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 5ee03b75cff..2f06e1bf532 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -22,7 +22,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.137 2007/01/22 20:00:39 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/optimizer/prep/prepunion.c,v 1.138 2007/02/19 07:03:30 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -177,7 +177,10 @@ recurse_set_operations(Node *setOp, PlannerInfo *root, /* * Generate plan for primitive subquery */ - subplan = subquery_planner(subquery, tuple_fraction, NULL); + subplan = subquery_planner(root->glob, subquery, + root->query_level + 1, + tuple_fraction, + NULL); /* * Add a SubqueryScan with the caller-requested targetlist |