diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-14 16:59:59 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2016-03-14 16:59:59 -0400 |
commit | 307c78852f516042cebacaed411a0391bfeb2129 (patch) | |
tree | afa2959e11e171e93411164a7e5b0adfa3609700 /src/backend/optimizer/plan/createplan.c | |
parent | 07341a2980a37ccbb3a51af2bd2f3c87953d8ea4 (diff) | |
download | postgresql-307c78852f516042cebacaed411a0391bfeb2129.tar.gz postgresql-307c78852f516042cebacaed411a0391bfeb2129.zip |
Rethink representation of PathTargets.
In commit 19a541143a09c067 I did not make PathTarget a subtype of Node,
and embedded a RelOptInfo's reltarget directly into it rather than having
a separately-allocated Node. In hindsight that was misguided
micro-optimization, enabled by the fact that at that point we didn't have
any Paths with custom PathTargets. Now that PathTarget processing has
been fleshed out some more, it's easier to see that it's better to have
PathTarget as an indepedent Node type, even if it does cost us one more
palloc to create a RelOptInfo. So change it while we still can.
This commit just changes the representation, without doing anything more
interesting than that.
Diffstat (limited to 'src/backend/optimizer/plan/createplan.c')
-rw-r--r-- | src/backend/optimizer/plan/createplan.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 913ac844f09..e37bdfd2cfd 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -3279,7 +3279,7 @@ create_foreignscan_plan(PlannerInfo *root, ForeignPath *best_path, * Note: we must look at rel's targetlist, not the attr_needed data, * because attr_needed isn't computed for inheritance child rels. */ - pull_varattnos((Node *) rel->reltarget.exprs, scan_relid, &attrs_used); + pull_varattnos((Node *) rel->reltarget->exprs, scan_relid, &attrs_used); /* Add all the attributes used by restriction clauses. */ foreach(lc, rel->baserestrictinfo) |