From 5df625161918bc4e55a0f5c962296198cce9a1f0 Mon Sep 17 00:00:00 2001 From: Halil Ozan Akgul Date: Wed, 11 Aug 2021 14:59:40 +0300 Subject: [PATCH] Removes CopyGetAttnums function definition for PG14 This function was copied from Postgres but it is not static at PG14 So we keep the definition only for previous versions Relevant PG commit: c532d15dddff14b01fe9ef1d465013cb8ef186df --- src/backend/distributed/commands/multi_copy.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/backend/distributed/commands/multi_copy.c b/src/backend/distributed/commands/multi_copy.c index ebc9f3fa6..bdfccda23 100644 --- a/src/backend/distributed/commands/multi_copy.c +++ b/src/backend/distributed/commands/multi_copy.c @@ -267,7 +267,9 @@ static CopyCoercionData * ColumnCoercionPaths(TupleDesc destTupleDescriptor, Oid *finalColumnTypeArray); static FmgrInfo * TypeOutputFunctions(uint32 columnCount, Oid *typeIdArray, bool binaryFormat); +#if PG_VERSION_NUM < PG_VERSION_14 static List * CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist); +#endif static bool CopyStatementHasFormat(CopyStmt *copyStatement, char *formatName); static void CitusCopyFrom(CopyStmt *copyStatement, QueryCompletionCompat *completionTag); static HTAB * CreateConnectionStateHash(MemoryContext memoryContext); @@ -3277,6 +3279,8 @@ CreateRangeTable(Relation rel, AclMode requiredAccess) } +#if PG_VERSION_NUM < PG_VERSION_14 + /* Helper for CheckCopyPermissions(), copied from postgres */ static List * CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist) @@ -3358,6 +3362,9 @@ CopyGetAttnums(TupleDesc tupDesc, Relation rel, List *attnamelist) } +#endif + + /* * CreateConnectionStateHash constructs a hash table which maps from socket * number to CopyConnectionState, passing the provided MemoryContext to