File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 3535#include  "libpq/libpq.h" 
3636
3737
38+ /* 
39+  * While building PostgreSQL on Windows the msvc compiler produces .def file 
40+  * which contains all the symbols that were declared as external except the ones 
41+  * that were declared but not defined. We redefine variables below to prevent 
42+  * 'unresolved symbol' errors on Windows. But we have to disable COPY feature 
43+  * on Windows 
44+  */ 
45+ #ifdef  WIN32 
46+ bool 				XactReadOnly  =  false;
47+ ProtocolVersion 		FrontendProtocol  =  (ProtocolVersion ) 0 ;
48+ #endif 
49+ 
50+ 
3851static  uint64  PathmanCopyFrom (CopyState  cstate ,
3952							  Relation  parent_rel ,
4053							  List  * range_table ,
@@ -95,6 +108,11 @@ is_pathman_related_copy(Node *parsetree)
95108		}
96109
97110		elog (DEBUG1 , "Overriding default behavior for COPY [%u]" , partitioned_table );
111+ 
112+ 		#ifdef  WIN32 
113+ 			elog (ERROR , "COPY is not supported for partitioned tables on Windows" );
114+ 		#endif 
115+ 
98116		return  true;
99117	}
100118
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments