Remove useless pg version checks (#4741)

pull/4709/head
Onur Tirtir 2021-02-23 21:20:18 +03:00 committed by GitHub
parent dbb88f6f8b
commit 495096ef5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 20 deletions

View File

@ -578,7 +578,6 @@ SelectedChunkMask(StripeSkipList *stripeSkipList, List *projectedColumnList,
Node *baseConstraint = BuildBaseConstraint(column); Node *baseConstraint = BuildBaseConstraint(column);
for (chunkIndex = 0; chunkIndex < stripeSkipList->chunkCount; chunkIndex++) for (chunkIndex = 0; chunkIndex < stripeSkipList->chunkCount; chunkIndex++)
{ {
bool predicateRefuted = false;
ColumnChunkSkipNode *chunkSkipNodeArray = ColumnChunkSkipNode *chunkSkipNodeArray =
stripeSkipList->chunkSkipNodeArray[columnIndex]; stripeSkipList->chunkSkipNodeArray[columnIndex];
ColumnChunkSkipNode *chunkSkipNode = &chunkSkipNodeArray[chunkIndex]; ColumnChunkSkipNode *chunkSkipNode = &chunkSkipNodeArray[chunkIndex];
@ -596,12 +595,8 @@ SelectedChunkMask(StripeSkipList *stripeSkipList, List *projectedColumnList,
chunkSkipNode->maximumValue); chunkSkipNode->maximumValue);
List *constraintList = list_make1(baseConstraint); List *constraintList = list_make1(baseConstraint);
#if (PG_VERSION_NUM >= 100000) bool predicateRefuted =
predicateRefuted = predicate_refuted_by(constraintList, restrictInfoList, predicate_refuted_by(constraintList, restrictInfoList, false);
false);
#else
predicateRefuted = predicate_refuted_by(constraintList, restrictInfoList);
#endif
if (predicateRefuted && selectedChunkMask[chunkIndex]) if (predicateRefuted && selectedChunkMask[chunkIndex])
{ {
selectedChunkMask[chunkIndex] = false; selectedChunkMask[chunkIndex] = false;

View File

@ -14,23 +14,10 @@
#ifndef COLUMNAR_COMPAT_H #ifndef COLUMNAR_COMPAT_H
#define COLUMNAR_COMPAT_H #define COLUMNAR_COMPAT_H
#if PG_VERSION_NUM < 100000
/* Accessor for the i'th attribute of tupdesc. */
#define TupleDescAttr(tupdesc, i) ((tupdesc)->attrs[(i)])
#endif
#if PG_VERSION_NUM < 110000
#define ALLOCSET_DEFAULT_SIZES ALLOCSET_DEFAULT_MINSIZE, ALLOCSET_DEFAULT_INITSIZE, \
ALLOCSET_DEFAULT_MAXSIZE
#define ACLCHECK_OBJECT_TABLE ACL_KIND_CLASS
#else
#define ACLCHECK_OBJECT_TABLE OBJECT_TABLE #define ACLCHECK_OBJECT_TABLE OBJECT_TABLE
#define ExplainPropertyLong(qlabel, value, es) \ #define ExplainPropertyLong(qlabel, value, es) \
ExplainPropertyInteger(qlabel, NULL, value, es) ExplainPropertyInteger(qlabel, NULL, value, es)
#endif
#if PG_VERSION_NUM < 120000 #if PG_VERSION_NUM < 120000
#define TTS_EMPTY(slot) ((slot)->tts_isempty) #define TTS_EMPTY(slot) ((slot)->tts_isempty)