aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pl/plpgsql/src/pl_exec.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c
index e8205275036..9c41ca08253 100644
--- a/src/pl/plpgsql/src/pl_exec.c
+++ b/src/pl/plpgsql/src/pl_exec.c
@@ -8306,8 +8306,7 @@ exec_save_simple_expr(PLpgSQL_expr *expr, CachedPlan *cplan)
* might've stuck a Material node atop it. The simplest way to deal with
* this is to look through the Gather and/or Material nodes. The upper
* node's tlist would normally contain a Var referencing the child node's
- * output, but it could also be a Param, or it could be a Const that
- * setrefs.c copied as-is.
+ * output ... but setrefs.c might also have copied a Const as-is.
*/
plan = stmt->planTree;
for (;;)
@@ -8334,9 +8333,9 @@ exec_save_simple_expr(PLpgSQL_expr *expr, CachedPlan *cplan)
/* If setrefs.c copied up a Const, no need to look further */
if (IsA(tle_expr, Const))
break;
- /* Otherwise, it had better be a Param or an outer Var */
- Assert(IsA(tle_expr, Param) || (IsA(tle_expr, Var) &&
- ((Var *) tle_expr)->varno == OUTER_VAR));
+ /* Otherwise, it better be an outer Var */
+ Assert(IsA(tle_expr, Var));
+ Assert(((Var *) tle_expr)->varno == OUTER_VAR);
/* Descend to the child node */
plan = plan->lefttree;
}