--- \dll\postgresql-12.0\a\backend\commands\copy.c	Mon Sep 30 17:06:55 2019
+++ copy.c	Fri Nov 22 18:33:05 2019
@@ -3426,8 +3426,7 @@
 	cstate->raw_buf_index = cstate->raw_buf_len = 0;
 
 	/* Assign range table, we'll need it in CopyFrom. */
-	if (pstate)
-		cstate->range_table = pstate->p_rtable;
+	cstate->range_table = pstate->p_rtable;
 
 	tupDesc = RelationGetDescr(cstate->rel);
 	num_phys_attrs = tupDesc->natts;
