diff options
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
-rw-r--r-- | contrib/postgres_fdw/postgres_fdw.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c index ffe6388a23b..465f43cd7c9 100644 --- a/contrib/postgres_fdw/postgres_fdw.c +++ b/contrib/postgres_fdw/postgres_fdw.c @@ -479,7 +479,7 @@ postgresGetForeignRelSize(PlannerInfo *root, * columns used in them. Doesn't seem worth detecting that case though.) */ fpinfo->attrs_used = NULL; - pull_varattnos((Node *) baserel->reltargetlist, baserel->relid, + pull_varattnos((Node *) baserel->reltarget.exprs, baserel->relid, &fpinfo->attrs_used); foreach(lc, fpinfo->local_conds) { @@ -522,7 +522,7 @@ postgresGetForeignRelSize(PlannerInfo *root, /* Report estimated baserel size to planner. */ baserel->rows = fpinfo->rows; - baserel->width = fpinfo->width; + baserel->reltarget.width = fpinfo->width; } else { @@ -539,7 +539,8 @@ postgresGetForeignRelSize(PlannerInfo *root, { baserel->pages = 10; baserel->tuples = - (10 * BLCKSZ) / (baserel->width + MAXALIGN(SizeofHeapTupleHeader)); + (10 * BLCKSZ) / (baserel->reltarget.width + + MAXALIGN(SizeofHeapTupleHeader)); } /* Estimate baserel size as best we can with local statistics. */ @@ -2176,7 +2177,7 @@ estimate_path_cost_size(PlannerInfo *root, * between foreign relations. */ rows = foreignrel->rows; - width = foreignrel->width; + width = foreignrel->reltarget.width; /* Back into an estimate of the number of retrieved rows. */ retrieved_rows = clamp_row_est(rows / fpinfo->local_conds_sel); @@ -3646,7 +3647,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root, &width, &startup_cost, &total_cost); /* Now update this information in the joinrel */ joinrel->rows = rows; - joinrel->width = width; + joinrel->reltarget.width = width; fpinfo->rows = rows; fpinfo->width = width; fpinfo->startup_cost = startup_cost; |