Introduces BeginCopyFrom_compat macro

BeginCopyFrom function now has a new whereClause parameter.
In the function this parameter is assigned to the whereClause field of the CopyFromState returned
Currently in Postgres there is only one place where this argument isn't NULL, and in previous PG version the whereClause argument of copy state is set right after the function call
Since we don't have such example all current whereClause parameters are set to NULL

Relevant PG commit:
c532d15dddff14b01fe9ef1d465013cb8ef186df
pull/5209/head
Halil Ozan Akgul 2021-08-13 15:58:21 +03:00 committed by Sait Talha Nisanci
parent 35cfa5d7b9
commit db2d9af863
1 changed files with 2 additions and 0 deletions

View File

@ -49,6 +49,7 @@
#define VACOPTVALUE_ENABLED_COMPAT VACOPTVALUE_ENABLED
#define IsReindexWithParam_compat(reindex, param) IsReindexWithParam(reindex, param)
#define CopyFromState_compat CopyFromState
#define BeginCopyFrom_compat(a, b, c, d, e, f, g, h) BeginCopyFrom(a, b, c, d, e, f, g, h)
#else
#define AlterTableStmtObjType(a) ((a)->relkind)
#define F_NEXTVAL_COMPAT F_NEXTVAL_OID
@ -71,6 +72,7 @@
((strcmp(param, "verbose") == 0) ? ((reindex)->options == REINDEXOPT_VERBOSE) : \
false))
#define CopyFromState_compat CopyState
#define BeginCopyFrom_compat(a, b, c, d, e, f, g, h) BeginCopyFrom(a, b, d, e, f, g, h)
#endif
#if PG_VERSION_NUM >= PG_VERSION_13