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