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 /contrib/file_fdw/file_fdw.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 'contrib/file_fdw/file_fdw.c')
-rw-r--r-- | contrib/file_fdw/file_fdw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index dc035d72a21..0ac4658e84d 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -821,7 +821,7 @@ check_selective_binary_conversion(RelOptInfo *baserel, } /* Collect all the attributes needed for joins or final output. */ - pull_varattnos((Node *) baserel->reltarget.exprs, baserel->relid, + pull_varattnos((Node *) baserel->reltarget->exprs, baserel->relid, &attrs_used); /* Add all the attributes used by restriction clauses. */ @@ -953,7 +953,7 @@ estimate_size(PlannerInfo *root, RelOptInfo *baserel, */ int tuple_width; - tuple_width = MAXALIGN(baserel->reltarget.width) + + tuple_width = MAXALIGN(baserel->reltarget->width) + MAXALIGN(SizeofHeapTupleHeader); ntuples = clamp_row_est((double) stat_buf.st_size / (double) tuple_width); |