@@ -103,7 +103,7 @@ enum FdwModifyPrivateIndex
103103 FdwModifyPrivateTargetAttnums ,
104104 /* Length till the end of VALUES clause (as an Integer node) */
105105 FdwModifyPrivateLen ,
106- /* has-returning flag (as an Integer node) */
106+ /* has-returning flag (as a Boolean node) */
107107 FdwModifyPrivateHasReturning ,
108108 /* Integer list of attribute numbers retrieved by RETURNING */
109109 FdwModifyPrivateRetrievedAttrs
@@ -122,11 +122,11 @@ enum FdwDirectModifyPrivateIndex
122122{
123123 /* SQL statement to execute remotely (as a String node) */
124124 FdwDirectModifyPrivateUpdateSql ,
125- /* has-returning flag (as an Integer node) */
125+ /* has-returning flag (as a Boolean node) */
126126 FdwDirectModifyPrivateHasReturning ,
127127 /* Integer list of attribute numbers retrieved by RETURNING */
128128 FdwDirectModifyPrivateRetrievedAttrs ,
129- /* set-processed flag (as an Integer node) */
129+ /* set-processed flag (as a Boolean node) */
130130 FdwDirectModifyPrivateSetProcessed
131131};
132132
@@ -280,9 +280,9 @@ typedef struct PgFdwAnalyzeState
280280 */
281281enum FdwPathPrivateIndex
282282{
283- /* has-final-sort flag (as an Integer node) */
283+ /* has-final-sort flag (as a Boolean node) */
284284 FdwPathPrivateHasFinalSort ,
285- /* has-limit flag (as an Integer node) */
285+ /* has-limit flag (as a Boolean node) */
286286 FdwPathPrivateHasLimit
287287};
288288
@@ -1245,9 +1245,9 @@ postgresGetForeignPlan(PlannerInfo *root,
12451245 */
12461246 if (best_path -> fdw_private )
12471247 {
1248- has_final_sort = intVal (list_nth (best_path -> fdw_private ,
1248+ has_final_sort = boolVal (list_nth (best_path -> fdw_private ,
12491249 FdwPathPrivateHasFinalSort ));
1250- has_limit = intVal (list_nth (best_path -> fdw_private ,
1250+ has_limit = boolVal (list_nth (best_path -> fdw_private ,
12511251 FdwPathPrivateHasLimit ));
12521252 }
12531253
@@ -1879,7 +1879,7 @@ postgresPlanForeignModify(PlannerInfo *root,
18791879 return list_make5 (makeString (sql .data ),
18801880 targetAttrs ,
18811881 makeInteger (values_end_len ),
1882- makeInteger ((retrieved_attrs != NIL )),
1882+ makeBoolean ((retrieved_attrs != NIL )),
18831883 retrieved_attrs );
18841884}
18851885
@@ -1916,7 +1916,7 @@ postgresBeginForeignModify(ModifyTableState *mtstate,
19161916 FdwModifyPrivateTargetAttnums );
19171917 values_end_len = intVal (list_nth (fdw_private ,
19181918 FdwModifyPrivateLen ));
1919- has_returning = intVal (list_nth (fdw_private ,
1919+ has_returning = boolVal (list_nth (fdw_private ,
19201920 FdwModifyPrivateHasReturning ));
19211921 retrieved_attrs = (List * ) list_nth (fdw_private ,
19221922 FdwModifyPrivateRetrievedAttrs );
@@ -2567,9 +2567,9 @@ postgresPlanDirectModify(PlannerInfo *root,
25672567 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
25682568 */
25692569 fscan -> fdw_private = list_make4 (makeString (sql .data ),
2570- makeInteger ((retrieved_attrs != NIL )),
2570+ makeBoolean ((retrieved_attrs != NIL )),
25712571 retrieved_attrs ,
2572- makeInteger (plan -> canSetTag ));
2572+ makeBoolean (plan -> canSetTag ));
25732573
25742574 /*
25752575 * Update the foreign-join-related fields.
@@ -2667,11 +2667,11 @@ postgresBeginDirectModify(ForeignScanState *node, int eflags)
26672667 /* Get private info created by planner functions. */
26682668 dmstate -> query = strVal (list_nth (fsplan -> fdw_private ,
26692669 FdwDirectModifyPrivateUpdateSql ));
2670- dmstate -> has_returning = intVal (list_nth (fsplan -> fdw_private ,
2670+ dmstate -> has_returning = boolVal (list_nth (fsplan -> fdw_private ,
26712671 FdwDirectModifyPrivateHasReturning ));
26722672 dmstate -> retrieved_attrs = (List * ) list_nth (fsplan -> fdw_private ,
26732673 FdwDirectModifyPrivateRetrievedAttrs );
2674- dmstate -> set_processed = intVal (list_nth (fsplan -> fdw_private ,
2674+ dmstate -> set_processed = boolVal (list_nth (fsplan -> fdw_private ,
26752675 FdwDirectModifyPrivateSetProcessed ));
26762676
26772677 /* Create context for per-tuple temp workspace. */
@@ -6566,7 +6566,7 @@ add_foreign_ordered_paths(PlannerInfo *root, RelOptInfo *input_rel,
65666566 * Build the fdw_private list that will be used by postgresGetForeignPlan.
65676567 * Items in the list must match order in enum FdwPathPrivateIndex.
65686568 */
6569- fdw_private = list_make2 (makeInteger (true), makeInteger (false));
6569+ fdw_private = list_make2 (makeBoolean (true), makeBoolean (false));
65706570
65716571 /* Create foreign ordering path */
65726572 ordered_path = create_foreign_upper_path (root ,
@@ -6797,8 +6797,8 @@ add_foreign_final_paths(PlannerInfo *root, RelOptInfo *input_rel,
67976797 * Build the fdw_private list that will be used by postgresGetForeignPlan.
67986798 * Items in the list must match order in enum FdwPathPrivateIndex.
67996799 */
6800- fdw_private = list_make2 (makeInteger (has_final_sort ),
6801- makeInteger (extra -> limit_needed ));
6800+ fdw_private = list_make2 (makeBoolean (has_final_sort ),
6801+ makeBoolean (extra -> limit_needed ));
68026802
68036803 /*
68046804 * Create foreign final path; this gets rid of a no-longer-needed outer
0 commit comments