mirror of https://github.com/citusdata/citus.git
Enhance compatibility for create_foreignscan_path with PG18 and PG17 versions
parent
44821f1264
commit
08ed6433a2
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue