@@ -485,7 +485,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
485485 * columns used in them. Doesn't seem worth detecting that case though.)
486486 */
487487 fpinfo -> attrs_used = NULL ;
488- pull_varattnos ((Node * ) baserel -> reltarget . exprs , baserel -> relid ,
488+ pull_varattnos ((Node * ) baserel -> reltarget -> exprs , baserel -> relid ,
489489 & fpinfo -> attrs_used );
490490 foreach (lc , fpinfo -> local_conds )
491491 {
@@ -536,7 +536,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
536536
537537 /* Report estimated baserel size to planner. */
538538 baserel -> rows = fpinfo -> rows ;
539- baserel -> reltarget . width = fpinfo -> width ;
539+ baserel -> reltarget -> width = fpinfo -> width ;
540540 }
541541 else
542542 {
@@ -553,7 +553,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
553553 {
554554 baserel -> pages = 10 ;
555555 baserel -> tuples =
556- (10 * BLCKSZ ) / (baserel -> reltarget . width +
556+ (10 * BLCKSZ ) / (baserel -> reltarget -> width +
557557 MAXALIGN (SizeofHeapTupleHeader ));
558558 }
559559
@@ -797,6 +797,7 @@ postgresGetForeignPaths(PlannerInfo *root,
797797 * to estimate cost and size of this path.
798798 */
799799 path = create_foreignscan_path (root , baserel ,
800+ NULL , /* default pathtarget */
800801 fpinfo -> rows ,
801802 fpinfo -> startup_cost ,
802803 fpinfo -> total_cost ,
@@ -968,6 +969,7 @@ postgresGetForeignPaths(PlannerInfo *root,
968969
969970 /* Make the path */
970971 path = create_foreignscan_path (root , baserel ,
972+ NULL , /* default pathtarget */
971973 rows ,
972974 startup_cost ,
973975 total_cost ,
@@ -2168,7 +2170,7 @@ estimate_path_cost_size(PlannerInfo *root,
21682170 * between foreign relations.
21692171 */
21702172 rows = foreignrel -> rows ;
2171- width = foreignrel -> reltarget . width ;
2173+ width = foreignrel -> reltarget -> width ;
21722174
21732175 /* Back into an estimate of the number of retrieved rows. */
21742176 retrieved_rows = clamp_row_est (rows / fpinfo -> local_conds_sel );
@@ -3353,10 +3355,8 @@ postgresImportForeignSchema(ImportForeignSchemaStmt *stmt, Oid serverOid)
33533355 *
33543356 * 1) Join type is INNER or OUTER (one of LEFT/RIGHT/FULL)
33553357 * 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
33603360 * can move unpushable clauses upwards in the join tree).
33613361 */
33623362static bool
@@ -3571,6 +3571,7 @@ add_paths_with_pathkeys_for_rel(PlannerInfo *root, RelOptInfo *rel,
35713571
35723572 add_path (rel , (Path * )
35733573 create_foreignscan_path (root , rel ,
3574+ NULL ,
35743575 rows ,
35753576 startup_cost ,
35763577 total_cost ,
@@ -3696,7 +3697,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
36963697 & width , & startup_cost , & total_cost );
36973698 /* Now update this information in the joinrel */
36983699 joinrel -> rows = rows ;
3699- joinrel -> reltarget . width = width ;
3700+ joinrel -> reltarget -> width = width ;
37003701 fpinfo -> rows = rows ;
37013702 fpinfo -> width = width ;
37023703 fpinfo -> startup_cost = startup_cost ;
@@ -3708,6 +3709,7 @@ postgresGetForeignJoinPaths(PlannerInfo *root,
37083709 */
37093710 joinpath = create_foreignscan_path (root ,
37103711 joinrel ,
3712+ NULL , /* default pathtarget */
37113713 rows ,
37123714 startup_cost ,
37133715 total_cost ,
0 commit comments