@@ -485,7 +485,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
485
485
* columns used in them. Doesn't seem worth detecting that case though.)
486
486
*/
487
487
fpinfo -> attrs_used = NULL ;
488
- pull_varattnos ((Node * )baserel -> reltarget . exprs ,baserel -> relid ,
488
+ pull_varattnos ((Node * )baserel -> reltarget -> exprs ,baserel -> relid ,
489
489
& fpinfo -> attrs_used );
490
490
foreach (lc ,fpinfo -> local_conds )
491
491
{
@@ -536,7 +536,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
536
536
537
537
/* Report estimated baserel size to planner. */
538
538
baserel -> rows = fpinfo -> rows ;
539
- baserel -> reltarget . width = fpinfo -> width ;
539
+ baserel -> reltarget -> width = fpinfo -> width ;
540
540
}
541
541
else
542
542
{
@@ -553,7 +553,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
553
553
{
554
554
baserel -> pages = 10 ;
555
555
baserel -> tuples =
556
- (10 * BLCKSZ ) / (baserel -> reltarget . width +
556
+ (10 * BLCKSZ ) / (baserel -> reltarget -> width +
557
557
MAXALIGN (SizeofHeapTupleHeader ));
558
558
}
559
559
@@ -797,6 +797,7 @@ postgresGetForeignPaths(PlannerInfo *root,
797
797
* to estimate cost and size of this path.
798
798
*/
799
799
path = create_foreignscan_path (root ,baserel ,
800
+ NULL ,/* default pathtarget */
800
801
fpinfo -> rows ,
801
802
fpinfo -> startup_cost ,
802
803
fpinfo -> total_cost ,
@@ -968,6 +969,7 @@ postgresGetForeignPaths(PlannerInfo *root,
968
969
969
970
/* Make the path */
970
971
path = create_foreignscan_path (root ,baserel ,
972
+ NULL ,/* default pathtarget */
971
973
rows ,
972
974
startup_cost ,
973
975
total_cost ,
@@ -2168,7 +2170,7 @@ estimate_path_cost_size(PlannerInfo *root,
2168
2170
* between foreign relations.
2169
2171
*/
2170
2172
rows = foreignrel -> rows ;
2171
- width = foreignrel -> reltarget . width ;
2173
+ width = foreignrel -> reltarget -> width ;
2172
2174
2173
2175
/* Back into an estimate of the number of retrieved rows. */
2174
2176
retrieved_rows = clamp_row_est (rows /fpinfo -> local_conds_sel );
@@ -3353,10 +3355,8 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
3353
3355
*
3354
3356
* 1) Join type is INNER or OUTER (one of LEFT/RIGHT/FULL)
3355
3357
* 2) Both outer and inner portions are safe to push-down
3356
- * 3) All foreign tables in the join belong to the same foreign server and use
3357
- * the same user mapping.
3358
- * 4) All join conditions are safe to push down
3359
- * 5) No relation has local filter (this can be relaxed for INNER JOIN, if we
3358
+ * 3) All join conditions are safe to push down
3359
+ * 4) No relation has local filter (this can be relaxed for INNER JOIN, if we
3360
3360
* can move unpushable clauses upwards in the join tree).
3361
3361
*/
3362
3362
static bool
@@ -3571,6 +3571,7 @@ add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel,
3571
3571
3572
3572
add_path (rel , (Path * )
3573
3573
create_foreignscan_path (root ,rel ,
3574
+ NULL ,
3574
3575
rows ,
3575
3576
startup_cost ,
3576
3577
total_cost ,
@@ -3696,7 +3697,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
3696
3697
& width ,& startup_cost ,& total_cost );
3697
3698
/* Now update this information in the joinrel */
3698
3699
joinrel -> rows = rows ;
3699
- joinrel -> reltarget . width = width ;
3700
+ joinrel -> reltarget -> width = width ;
3700
3701
fpinfo -> rows = rows ;
3701
3702
fpinfo -> width = width ;
3702
3703
fpinfo -> startup_cost = startup_cost ;
@@ -3708,6 +3709,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
3708
3709
*/
3709
3710
joinpath = create_foreignscan_path (root ,
3710
3711
joinrel ,
3712
+ NULL ,/* default pathtarget */
3711
3713
rows ,
3712
3714
startup_cost ,
3713
3715
total_cost ,