diff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c
index 5b3f777f2c3277af2f5c9d68f32c8d9efd80ba00..00cc51392089fbd242b64a68ce95d933fb359eb6 100644
--- a/src/backend/commands/prepare.c
+++ b/src/backend/commands/prepare.c
@@ -91,7 +91,7 @@ PrepareQuery(PrepareStmt *stmt, const char *queryString,
 	 * to see the unmodified raw parse tree.
 	 */
 	plansource = CreateCachedPlan(rawstmt, queryString,
-								  CreateCommandTag(stmt->query), NULL);
+								  CreateCommandTag(stmt->query));
 
 	/* Transform list of TypeNames to array of type OIDs */
 	nargs = list_length(stmt->argtypes);
diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c
index 54c022d0132c72b89ccc4d6c56584b87a784e65b..2f07a444b4d47f194e56f0cdd25e403859ed6f75 100644
--- a/src/backend/executor/spi.c
+++ b/src/backend/executor/spi.c
@@ -1777,8 +1777,7 @@ _SPI_prepare_plan(const char *src, SPIPlanPtr plan)
 		 */
 		plansource = CreateCachedPlan(parsetree,
 									  src,
-									  CreateCommandTag(parsetree->stmt),
-									  _SPI_current->queryEnv);
+									  CreateCommandTag(parsetree->stmt));
 
 		/*
 		 * Parameter datatypes are driven by parserSetup hook if provided,
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 139c4c0f68cc6afab0e2f0e96506afde0a618dfd..a2282058c0d796eae3fc2f51f47b918f78c80652 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -1318,8 +1318,7 @@ exec_parse_message(const char *query_string,	/* string to execute */
 		 * Create the CachedPlanSource before we do parse analysis, since it
 		 * needs to see the unmodified raw parse tree.
 		 */
-		psrc = CreateCachedPlan(raw_parse_tree, query_string, commandTag,
-								NULL);
+		psrc = CreateCachedPlan(raw_parse_tree, query_string, commandTag);
 
 		/*
 		 * Set up a snapshot if parse analysis will need one.
@@ -1371,8 +1370,7 @@ exec_parse_message(const char *query_string,	/* string to execute */
 		/* Empty input string.  This is legal. */
 		raw_parse_tree = NULL;
 		commandTag = NULL;
-		psrc = CreateCachedPlan(raw_parse_tree, query_string, commandTag,
-								NULL);
+		psrc = CreateCachedPlan(raw_parse_tree, query_string, commandTag);
 		querytree_list = NIL;
 	}
 
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index b610c8e7ceef61dd2713bee3303b33fb23abc9af..c0fd0f967f6292ebaf432e3572f2189b249a579b 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -308,6 +308,8 @@ CheckRestrictedOperation(const char *cmdname)
  *	context: identifies source of statement (toplevel client command,
  *		non-toplevel client command, subcommand of a larger utility command)
  *	params: parameters to use during execution
+ *	queryEnv: environment for parse through execution (e.g., ephemeral named
+ *		tables like trigger transition tables).  May be NULL.
  *	dest: where to send results
  *	completionTag: points to a buffer of size COMPLETION_TAG_BUFSIZE
  *		in which to store a command completion status string.
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index a116d5ed63ee12d2463ba513afe3f4166cb25021..50da116cf446df39bc5fa374a3814d631b7bd4dc 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -151,8 +151,7 @@ InitPlanCache(void)
 CachedPlanSource *
 CreateCachedPlan(RawStmt *raw_parse_tree,
 				 const char *query_string,
-				 const char *commandTag,
-				 QueryEnvironment *queryEnv)
+				 const char *commandTag)
 {
 	CachedPlanSource *plansource;
 	MemoryContext source_context;
diff --git a/src/include/utils/plancache.h b/src/include/utils/plancache.h
index 48d4ac94b2ac7bb56b072abab4686e0ac6a100ef..9611f5a10c3c0176756c37ac246757f8716c0dc3 100644
--- a/src/include/utils/plancache.h
+++ b/src/include/utils/plancache.h
@@ -149,8 +149,7 @@ extern void ResetPlanCache(void);
 
 extern CachedPlanSource *CreateCachedPlan(struct RawStmt *raw_parse_tree,
 				 const char *query_string,
-				 const char *commandTag,
-				 QueryEnvironment *queryEnv);
+				 const char *commandTag);
 extern CachedPlanSource *CreateOneShotCachedPlan(struct RawStmt *raw_parse_tree,
 						const char *query_string,
 						const char *commandTag);