Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1ba3b15

Browse files
committed
Remove bogus assertion in transformExpressionList().
I think when I added this assertion (in commit8f889b1), I was onlythinking of the use of transformExpressionList at top level of INSERTand VALUES. But it's also called by transformRowExpr(), which cancertainly occur in an UPDATE targetlist, so it's inappropriate tosuppose that p_multiassign_exprs must be empty. Besides, since theinput is not expected to contain ResTargets, there's no reason itshould contain MultiAssignRefs either. Hence this code need notbe concerned about the state of p_multiassign_exprs, and we shouldjust drop the assertion.Per bug #17236 from ocean_li_996. It's been wrong for years,so back-patch to all supported branches.Discussion:https://postgr.es/m/17236-3210de9bcba1d7ca@postgresql.org
1 parentef1f158 commit1ba3b15

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/backend/parser/parse_target.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,9 @@ transformTargetList(ParseState *pstate, List *targetlist,
209209
* This is the identical transformation to transformTargetList, except that
210210
* the input list elements are bare expressions without ResTarget decoration,
211211
* and the output elements are likewise just expressions without TargetEntry
212-
* decoration. We use this for ROW() and VALUES() constructs.
212+
* decoration. Also, we don't expect any multiassign constructs within the
213+
* list, so there's nothing to do for that. We use this for ROW() and
214+
* VALUES() constructs.
213215
*/
214216
List*
215217
transformExpressionList(ParseState*pstate,List*exprlist,
@@ -261,9 +263,6 @@ transformExpressionList(ParseState *pstate, List *exprlist,
261263
transformExpr(pstate,e,exprKind));
262264
}
263265

264-
/* Shouldn't have any multiassign items here */
265-
Assert(pstate->p_multiassign_exprs==NIL);
266-
267266
returnresult;
268267
}
269268

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp