@@ -394,7 +394,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
394394 fpinfo -> shippable_extensions =
395395 ExtractExtensionList (defGetString (def ), false);
396396 else if (strcmp (def -> defname , "fetch_size" ) == 0 )
397- fpinfo -> fetch_size = strtol (defGetString (def ), NULL ,10 );
397+ fpinfo -> fetch_size = strtol (defGetString (def ), NULL , 10 );
398398 }
399399 foreach (lc , fpinfo -> table -> options )
400400 {
@@ -403,7 +403,7 @@ postgresGetForeignRelSize(PlannerInfo *root,
403403 if (strcmp (def -> defname , "use_remote_estimate" ) == 0 )
404404 fpinfo -> use_remote_estimate = defGetBoolean (def );
405405 else if (strcmp (def -> defname , "fetch_size" ) == 0 )
406- fpinfo -> fetch_size = strtol (defGetString (def ), NULL ,10 );
406+ fpinfo -> fetch_size = strtol (defGetString (def ), NULL , 10 );
407407 }
408408
409409 /*
@@ -530,8 +530,8 @@ get_useful_ecs_for_relation(PlannerInfo *root, RelOptInfo *rel)
530530 Relids relids ;
531531
532532 /*
533- * First, consider whether any active EC is potentially useful for a
534- * merge join against this relation.
533+ * First, consider whether any active EC is potentially useful for a merge
534+ * join against this relation.
535535 */
536536 if (rel -> has_eclass_joins )
537537 {
@@ -646,13 +646,13 @@ get_useful_pathkeys_for_relation(PlannerInfo *root, RelOptInfo *rel)
646646 }
647647
648648 /*
649- * Even if we're not using remote estimates, having the remote side do
650- * the sort generally won't be any worse than doing it locally, and it
651- * might be much better if the remote side can generate data in the right
652- * order without needing a sort at all. However, what we're going to do
653- * next is try to generate pathkeys that seem promising for possible merge
654- * joins, and that's more speculative. A wrong choice might hurt quite a
655- * bit, so bail out if we can't use remote estimates.
649+ * Even if we're not using remote estimates, having the remote side do the
650+ * sort generally won't be any worse than doing it locally, and it might
651+ * be much better if the remote side can generate data in the right order
652+ * without needing a sort at all. However, what we're going to do next is
653+ * try to generate pathkeys that seem promising for possible merge joins,
654+ * and that's more speculative. A wrong choice might hurt quite a bit, so
655+ * bail out if we can't use remote estimates.
656656 */
657657 if (!fpinfo -> use_remote_estimate )
658658 return useful_pathkeys_list ;
@@ -1006,6 +1006,7 @@ postgresGetForeignPlan(PlannerInfo *root,
10061006 deparseSelectStmtForRel (& sql , root , baserel , remote_conds ,
10071007 best_path -> path .pathkeys , & retrieved_attrs ,
10081008 & params_list );
1009+
10091010 /*
10101011 * Build the fdw_private list that will be available to the executor.
10111012 * Items in the list must match enum FdwScanPrivateIndex, above.
@@ -1090,7 +1091,7 @@ postgresBeginForeignScan(ForeignScanState *node, int eflags)
10901091 fsstate -> retrieved_attrs = (List * ) list_nth (fsplan -> fdw_private ,
10911092 FdwScanPrivateRetrievedAttrs );
10921093 fsstate -> fetch_size = intVal (list_nth (fsplan -> fdw_private ,
1093- FdwScanPrivateFetchSize ));
1094+ FdwScanPrivateFetchSize ));
10941095
10951096 /* Create contexts for batches of tuples and per-tuple temp workspace. */
10961097 fsstate -> batch_cxt = AllocSetContextCreate (estate -> es_query_cxt ,
@@ -2640,7 +2641,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
26402641
26412642 if (strcmp (def -> defname , "fetch_size" ) == 0 )
26422643 {
2643- fetch_size = strtol (defGetString (def ), NULL ,10 );
2644+ fetch_size = strtol (defGetString (def ), NULL , 10 );
26442645 break ;
26452646 }
26462647 }
@@ -2650,7 +2651,7 @@ postgresAcquireSampleRowsFunc(Relation relation, int elevel,
26502651
26512652 if (strcmp (def -> defname , "fetch_size" ) == 0 )
26522653 {
2653- fetch_size = strtol (defGetString (def ), NULL ,10 );
2654+ fetch_size = strtol (defGetString (def ), NULL , 10 );
26542655 break ;
26552656 }
26562657 }
0 commit comments