diff --git a/sqlite_fdw.c b/sqlite_fdw.c index b9683a6a..3b0390ea 100644 --- a/sqlite_fdw.c +++ b/sqlite_fdw.c @@ -973,7 +973,6 @@ sqliteGetForeignPlan(PlannerInfo *root, RelOptInfo *baserel, Oid foreigntableid, #if PG_VERSION_NUM >= 150000 has_final_sort = boolVal(list_nth(best_path->fdw_private, FdwPathPrivateHasFinalSort)); has_limit = boolVal(list_nth(best_path->fdw_private, FdwPathPrivateHasLimit)); - #else has_final_sort = intVal(list_nth(best_path->fdw_private, FdwPathPrivateHasFinalSort)); has_limit = intVal(list_nth(best_path->fdw_private, FdwPathPrivateHasLimit)); @@ -1886,7 +1885,11 @@ sqliteBeginForeignModify(ModifyTableState *mtstate, fmstate->conn = sqlite_get_connection(fmstate->server, false); fmstate->query = strVal(list_nth(fdw_private, FdwModifyPrivateUpdateSql)); fmstate->target_attrs = (List *) list_nth(fdw_private, FdwModifyPrivateTargetAttnums); +#if PG_VERSION_NUM >= 150000 fmstate->has_returning = boolVal(list_nth(fdw_private, FdwModifyPrivateHasReturning)); +#else + fmstate->has_returning = intVal(list_nth(fdw_private, FdwModifyPrivateHasReturning)); +#endif fmstate->retrieved_attrs = (List *) list_nth(fdw_private, FdwModifyPrivateTargetAttnums); fmstate->values_end = intVal(list_nth(fdw_private, FdwModifyPrivateLen)); fmstate->orig_query = pstrdup(fmstate->query); @@ -2556,12 +2559,14 @@ sqlitePlanDirectModify(PlannerInfo *root, rebuild_fdw_scan_tlist(fscan, returningList); } +#if PG_VERSION_NUM >= 150000 /* * Finally, unset the async-capable flag if it is set, as we currently * don't support asynchronous execution of direct modifications. */ if (fscan->scan.plan.async_capable) fscan->scan.plan.async_capable = false; +#endif table_close(rel, NoLock); return true;