mirror of https://github.com/citusdata/citus.git
write compat for create_foreignscan_path bcs of more arguments in PG17
Relevant PG commit:
9e9931d2bf40e2fea447d779c2e133c2c1256ef3
9e9931d2bf
pg17_kickoff
parent
651bcc705f
commit
ec9beb543c
|
@ -29,7 +29,7 @@
|
|||
#include "optimizer/restrictinfo.h"
|
||||
#include "utils/palloc.h"
|
||||
|
||||
#include "pg_version_constants.h"
|
||||
#include "pg_version_compat.h"
|
||||
|
||||
/* local function forward declarations */
|
||||
static void FakeGetForeignRelSize(PlannerInfo *root, RelOptInfo *baserel,
|
||||
|
@ -91,9 +91,11 @@ FakeGetForeignPaths(PlannerInfo *root, RelOptInfo *baserel, Oid foreigntableid)
|
|||
Cost startup_cost = 0;
|
||||
Cost total_cost = startup_cost + baserel->rows;
|
||||
|
||||
add_path(baserel, (Path *) create_foreignscan_path(root, baserel, NULL, baserel->rows,
|
||||
startup_cost, total_cost, NIL,
|
||||
NULL, NULL, NIL));
|
||||
add_path(baserel, (Path *) create_foreignscan_path_compat(root, baserel, NULL,
|
||||
baserel->rows,
|
||||
startup_cost, total_cost,
|
||||
NIL,
|
||||
NULL, NULL, NIL, NIL));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -104,6 +104,10 @@ getStxstattarget_compat(HeapTuple tup)
|
|||
|
||||
#define matched_compat(a) (a->matchKind == MERGE_WHEN_MATCHED)
|
||||
|
||||
#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)
|
||||
|
||||
#else
|
||||
|
||||
#include "access/htup_details.h"
|
||||
|
@ -131,6 +135,10 @@ getStxstattarget_compat(HeapTuple tup)
|
|||
|
||||
#define matched_compat(a) (a->matched)
|
||||
|
||||
#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, k)
|
||||
|
||||
#endif
|
||||
|
||||
#if PG_VERSION_NUM >= PG_VERSION_16
|
||||
|
|
Loading…
Reference in New Issue