diff --git a/src/include/pg_version_compat.h b/src/include/pg_version_compat.h index 8727b0768..03f5e202e 100644 --- a/src/include/pg_version_compat.h +++ b/src/include/pg_version_compat.h @@ -13,6 +13,31 @@ #include "pg_version_constants.h" +#if PG_VERSION_NUM >= PG_VERSION_18 +#define create_foreignscan_path_compat(a, b, c, d, e, f, g, h, i, j, k) \ + create_foreignscan_path( \ + (a), /* root */ \ + (b), /* rel */ \ + (c), /* target */ \ + (d), /* rows */ \ + 0, /* disabled_nodes */ \ + (e), /* startup_cost */ \ + (f), /* total_cost */ \ + (g), /* pathkeys */ \ + (h), /* required_outer */ \ + (i), /* fdw_outerpath */ \ + (j), /* fdw_restrictinfo*/ \ + (k) /* fdw_private */ \ + ) +#elif PG_VERSION_NUM >= PG_VERSION_17 +#define create_foreignscan_path_compat(a, b, c, d, e, f, g, h, i, j, k) \ + create_foreignscan_path( \ + (a), (b), (c), (d), \ + (e), (f), \ + (g), (h), (i), (j), (k) \ + ) +#endif + #if PG_VERSION_NUM >= PG_VERSION_17 #include "catalog/pg_am.h" @@ -384,36 +409,6 @@ getStxstattarget_compat(HeapTuple tup) #define matched_compat(a) (a->matchKind == MERGE_WHEN_MATCHED) -#include "nodes/bitmapset.h" /* for Relids */ -#include "nodes/pg_list.h" /* for List */ -#include "optimizer/pathnode.h" /* for create_foreignscan_path() */ - -#if PG_VERSION_NUM >= PG_VERSION_18 -#define create_foreignscan_path_compat(a, b, c, d, e, f, g, h, i, j, k) \ - create_foreignscan_path( \ - (a), /* root */ \ - (b), /* rel */ \ - (c), /* target */ \ - (d), /* rows */ \ - 0, /* disabled_nodes */ \ - (e), /* startup_cost */ \ - (f), /* total_cost */ \ - (g), /* pathkeys */ \ - (h), /* required_outer */ \ - (i), /* fdw_outerpath */ \ - (j), /* fdw_restrictinfo*/ \ - (k) /* fdw_private */ \ - ) -#else -#define create_foreignscan_path_compat(a, b, c, d, e, f, g, h, i, j, k) \ - create_foreignscan_path( \ - (a), (b), (c), (d), \ - (e), (f), \ - (g), (h), (i), (j), (k) \ - ) -#endif - - #define getProcNo_compat(a) (a->vxid.procNumber) #define getLxid_compat(a) (a->vxid.lxid)