diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c
index f3be242..3cd8940 100644
--- a/src/backend/executor/nodeAppend.c
+++ b/src/backend/executor/nodeAppend.c
@@ -143,22 +143,13 @@ ExecInitAppend(Append *node, EState *estate, int eflags)
 															list_length(node->appendplans));
 
 			/*
-			 * The case where no subplans survive pruning must be handled
-			 * specially.  The problem here is that code in explain.c requires
-			 * an Append to have at least one subplan in order for it to
-			 * properly determine the Vars in that subplan's targetlist.  We
-			 * sidestep this issue by just initializing the first subplan and
-			 * setting as_whichplan to NO_MATCHING_SUBPLANS to indicate that
-			 * we don't really need to scan any subnodes.
+			 * If no subplans survive pruning, change as_whichplan to
+			 * NO_MATCHING_SUBPLANS, to indicate that we don't really need to
+			 * scan any subnodes.
 			 */
 			if (bms_is_empty(validsubplans))
-			{
 				appendstate->as_whichplan = NO_MATCHING_SUBPLANS;
 
-				/* Mark the first as valid so that it's initialized below */
-				validsubplans = bms_make_singleton(0);
-			}
-
 			nplans = bms_num_members(validsubplans);
 		}
 		else
@@ -174,10 +165,7 @@ ExecInitAppend(Append *node, EState *estate, int eflags)
 		 * immediately, preventing later calls to ExecFindMatchingSubPlans.
 		 */
 		if (!prunestate->do_exec_prune)
-		{
-			Assert(nplans > 0);
 			appendstate->as_valid_subplans = bms_add_range(NULL, 0, nplans - 1);
-		}
 	}
 	else
 	{
