|
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 | +#defineDISABLE_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 |
| -#ifdefWIN32 |
| 52 | +#ifdefDISABLE_PATHMAN_COPY |
46 | 53 | boolXactReadOnly= false;
|
47 | 54 | ProtocolVersionFrontendProtocol= (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 |
| -#ifdefWIN32 |
| 117 | +/* Emit ERROR if we can't see the necessary symbols */ |
| 118 | +#ifdefDISABLE_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;
|
|