mirror of https://github.com/citusdata/citus.git
Introduces SetTuplestoreDestReceiverParams_compat macro
SetTuplestoreDestReceiverParams function now has two new parameters This new macro give us the ability to use this new parameter for PG14 and it doesn't give the parameter for previous versions Existing parameters are set to NULL to keep previous behavior Relevant PG commit: 2f48ede080f42b97b594fb14102c82ca1001b80cpg14_support_after_rebase
parent
7c606837ab
commit
4469fb2eee
|
@ -1024,8 +1024,8 @@ worker_save_query_explain_analyze(PG_FUNCTION_ARGS)
|
||||||
TupleDesc tupleDescriptor = NULL;
|
TupleDesc tupleDescriptor = NULL;
|
||||||
Tuplestorestate *tupleStore = SetupTuplestore(fcinfo, &tupleDescriptor);
|
Tuplestorestate *tupleStore = SetupTuplestore(fcinfo, &tupleDescriptor);
|
||||||
DestReceiver *tupleStoreDest = CreateTuplestoreDestReceiver();
|
DestReceiver *tupleStoreDest = CreateTuplestoreDestReceiver();
|
||||||
SetTuplestoreDestReceiverParams(tupleStoreDest, tupleStore,
|
SetTuplestoreDestReceiverParams_compat(tupleStoreDest, tupleStore,
|
||||||
CurrentMemoryContext, false);
|
CurrentMemoryContext, false, NULL, NULL);
|
||||||
|
|
||||||
List *parseTreeList = pg_parse_query(queryString);
|
List *parseTreeList = pg_parse_query(queryString);
|
||||||
if (list_length(parseTreeList) != 1)
|
if (list_length(parseTreeList) != 1)
|
||||||
|
|
|
@ -55,6 +55,8 @@
|
||||||
#define ProcessUtility_compat(a, b, c, d, e, f, g, h) \
|
#define ProcessUtility_compat(a, b, c, d, e, f, g, h) \
|
||||||
ProcessUtility(a, b, c, d, e, f, g, h)
|
ProcessUtility(a, b, c, d, e, f, g, h)
|
||||||
#define COPY_FRONTEND_COMPAT COPY_FRONTEND
|
#define COPY_FRONTEND_COMPAT COPY_FRONTEND
|
||||||
|
#define SetTuplestoreDestReceiverParams_compat(a, b, c, d, e, f) \
|
||||||
|
SetTuplestoreDestReceiverParams(a, b, c, d, e, f)
|
||||||
#else
|
#else
|
||||||
#define AlterTableStmtObjType(a) ((a)->relkind)
|
#define AlterTableStmtObjType(a) ((a)->relkind)
|
||||||
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
|
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
|
||||||
|
@ -82,6 +84,8 @@
|
||||||
standard_ProcessUtility(a, b, d, e, f, g, h)
|
standard_ProcessUtility(a, b, d, e, f, g, h)
|
||||||
#define ProcessUtility_compat(a, b, c, d, e, f, g, h) ProcessUtility(a, b, d, e, f, g, h)
|
#define ProcessUtility_compat(a, b, c, d, e, f, g, h) ProcessUtility(a, b, d, e, f, g, h)
|
||||||
#define COPY_FRONTEND_COMPAT COPY_NEW_FE
|
#define COPY_FRONTEND_COMPAT COPY_NEW_FE
|
||||||
|
#define SetTuplestoreDestReceiverParams_compat(a, b, c, d, e, f) \
|
||||||
|
SetTuplestoreDestReceiverParams(a, b, c, d)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PG_VERSION_NUM >= PG_VERSION_13
|
#if PG_VERSION_NUM >= PG_VERSION_13
|
||||||
|
|
Loading…
Reference in New Issue