Introduces index_insert_compat macro

index_insert function now has a new parameter, indexUnchanged
This new macro give us the ability to use these new parameter for PG14 and they don't give the parameters for previous versions
Existing parameter is set to false

Relevant PG commit:
9dc718bdf2b1a574481a45624d42b674332e2903
talha_pg14_support
Halil Ozan Akgul 2021-08-18 16:28:45 +03:00 committed by Sait Talha Nisanci
parent b86ac4f2a3
commit 1ba3a77ef1
2 changed files with 6 additions and 2 deletions

View File

@ -1568,8 +1568,8 @@ ColumnarReadMissingRowsIntoIndex(TableScanDesc scan, Relation indexRelation,
Relation columnarRelation = scan->rs_rd; Relation columnarRelation = scan->rs_rd;
IndexUniqueCheck indexUniqueCheck = IndexUniqueCheck indexUniqueCheck =
indexInfo->ii_Unique ? UNIQUE_CHECK_YES : UNIQUE_CHECK_NO; indexInfo->ii_Unique ? UNIQUE_CHECK_YES : UNIQUE_CHECK_NO;
index_insert(indexRelation, indexValues, indexNulls, columnarItemPointer, index_insert_compat(indexRelation, indexValues, indexNulls, columnarItemPointer,
columnarRelation, indexUniqueCheck, indexInfo); columnarRelation, indexUniqueCheck, false, indexInfo);
validateIndexState->tups_inserted += 1; validateIndexState->tups_inserted += 1;
} }

View File

@ -22,6 +22,8 @@
#define ExecSimpleRelationInsert_compat(a, b, c) \ #define ExecSimpleRelationInsert_compat(a, b, c) \
ExecSimpleRelationInsert(a, b, c) ExecSimpleRelationInsert(a, b, c)
#define modifyStateResultRelInfo(a) ((a)->resultRelInfo) #define modifyStateResultRelInfo(a) ((a)->resultRelInfo)
#define index_insert_compat(a, b, c, d, e, f, g, h) \
index_insert(a, b, c, d, e, f, g, h)
#else #else
#define ColumnarProcessUtility_compat(a, b, c, d, e, f, g, h) \ #define ColumnarProcessUtility_compat(a, b, c, d, e, f, g, h) \
ColumnarProcessUtility(a, b, d, e, f, g, h) ColumnarProcessUtility(a, b, d, e, f, g, h)
@ -31,6 +33,8 @@
#define ExecSimpleRelationInsert_compat(a, b, c) \ #define ExecSimpleRelationInsert_compat(a, b, c) \
ExecSimpleRelationInsert(b, c) ExecSimpleRelationInsert(b, c)
#define modifyStateResultRelInfo(a) ((a)->estate->es_result_relation_info) #define modifyStateResultRelInfo(a) ((a)->estate->es_result_relation_info)
#define index_insert_compat(a, b, c, d, e, f, g, h) \
index_insert(a, b, c, d, e, f, h)
#endif #endif
#define ACLCHECK_OBJECT_TABLE OBJECT_TABLE #define ACLCHECK_OBJECT_TABLE OBJECT_TABLE