diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-02-07 04:41:04 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-02-07 04:41:04 +0000 |
commit | d8733ce674f62f0e13cfc97d0340b43e1906f458 (patch) | |
tree | fc210768a24a14d07b9bffb9dd629f400bb7cc8f /src/backend/optimizer/plan/createplan.c | |
parent | 2bda7a44067f22f73cd7937f6c88efd1bbe97638 (diff) |
Repair planning bugs caused by my misguided removal of restrictinfo link
fields in JoinPaths --- turns out that we do need that after all :-(.
Also, rearrange planner so that only one RelOptInfo is created for a
particular set of joined base relations, no matter how many different
subsets of relations it can be created from. This saves memory and
processing time compared to the old method of making a bunch of RelOptInfos
and then removing the duplicates. Clean up the jointree iteration logic;
not sure if it's better, but I sure find it more readable and plausible
now, particularly for the case of 'bushy plans'.
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 69c0a3f65be..97a021a2dd2 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.83 2000/02/03 06:12:18 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.84 2000/02/07 04:41:00 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -147,7 +147,7 @@ create_scan_node(Query *root, Path *best_path, List *tlist) * Extract the relevant restriction clauses from the parent relation; * the executor must apply all these restrictions during the scan. */ - scan_clauses = get_actual_clauses(best_path->parent->restrictinfo); + scan_clauses = get_actual_clauses(best_path->parent->baserestrictinfo); switch (best_path->pathtype) { @@ -203,7 +203,7 @@ create_join_node(Query *root, JoinPath *best_path, List *tlist) inner_node = create_plan(root, best_path->innerjoinpath); inner_tlist = inner_node->targetlist; - clauses = get_actual_clauses(best_path->path.parent->restrictinfo); + clauses = get_actual_clauses(best_path->joinrestrictinfo); switch (best_path->path.pathtype) { |