diff options
Diffstat (limited to 'src/backend/parser/parse_expr.c')
-rw-r--r-- | src/backend/parser/parse_expr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 02b8d0aca34..831db4af955 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -2656,8 +2656,8 @@ static Node * transformCurrentOfExpr(ParseState *pstate, CurrentOfExpr *cexpr) { /* CURRENT OF can only appear at top level of UPDATE/DELETE */ - Assert(pstate->p_target_rtindex > 0); - cexpr->cvarno = pstate->p_target_rtindex; + Assert(pstate->p_target_nsitem != NULL); + cexpr->cvarno = pstate->p_target_nsitem->p_rtindex; /* * Check to see if the cursor name matches a parameter of type REFCURSOR. |