Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb803886

Browse files
committed
Merge branch 'master_pgpro_copy' into rel_1_2_beta
2 parentsb94b2c1 +561b501 commitb803886

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

‎src/copy_stmt_hooking.c

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,21 @@
3535
#include"libpq/libpq.h"
3636

3737

38+
/*
39+
* Determine whether we should enable COPY or not (PostgresPro has a fix).
40+
*/
41+
#if defined(WIN32)&& !defined(PGPRO_PATHMAN_AWARE_COPY)
42+
#defineDISABLE_PATHMAN_COPY
43+
#endif
44+
3845
/*
3946
* While building PostgreSQL on Windows the msvc compiler produces .def file
4047
* which contains all the symbols that were declared as external except the ones
4148
* that were declared but not defined. We redefine variables below to prevent
4249
* 'unresolved symbol' errors on Windows. But we have to disable COPY feature
43-
* on Windows
50+
* on Windows.
4451
*/
45-
#ifdefWIN32
52+
#ifdefDISABLE_PATHMAN_COPY
4653
boolXactReadOnly= false;
4754
ProtocolVersionFrontendProtocol= (ProtocolVersion)0;
4855
#endif
@@ -107,10 +114,12 @@ is_pathman_related_copy(Node *parsetree)
107114
elog(ERROR,"freeze is not supported for partitioned tables");
108115
}
109116

110-
elog(DEBUG1,"Overriding default behavior for COPY [%u]",partitioned_table);
111-
112-
#ifdefWIN32
117+
/* Emit ERROR if we can't see the necessary symbols */
118+
#ifdefDISABLE_PATHMAN_COPY
113119
elog(ERROR,"COPY is not supported for partitioned tables on Windows");
120+
#else
121+
elog(DEBUG1,"Overriding default behavior for COPY [%u]",
122+
partitioned_table);
114123
#endif
115124

116125
return true;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp