File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 35
35
#include "libpq/libpq.h"
36
36
37
37
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
+ #define DISABLE_PATHMAN_COPY
43
+ #endif
44
+
38
45
/*
39
46
* While building PostgreSQL on Windows the msvc compiler produces .def file
40
47
* which contains all the symbols that were declared as external except the ones
41
48
* that were declared but not defined. We redefine variables below to prevent
42
49
* 'unresolved symbol' errors on Windows. But we have to disable COPY feature
43
- * on Windows
50
+ * on Windows.
44
51
*/
45
- #ifdef WIN32
52
+ #ifdef DISABLE_PATHMAN_COPY
46
53
bool XactReadOnly = false;
47
54
ProtocolVersion FrontendProtocol = (ProtocolVersion ) 0 ;
48
55
#endif
@@ -107,10 +114,12 @@ is_pathman_related_copy(Node *parsetree)
107
114
elog (ERROR , "freeze is not supported for partitioned tables" );
108
115
}
109
116
110
- elog (DEBUG1 , "Overriding default behavior for COPY [%u]" , partitioned_table );
111
-
112
- #ifdef WIN32
117
+ /* Emit ERROR if we can't see the necessary symbols */
118
+ #ifdef DISABLE_PATHMAN_COPY
113
119
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 );
114
123
#endif
115
124
116
125
return true;
You can’t perform that action at this time.
0 commit comments