aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_target.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_target.c')
-rw-r--r--src/backend/parser/parse_target.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index 4932e58022b..3d31be38d56 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -691,7 +691,13 @@ transformAssignmentIndirection(ParseState *pstate,
if (indirection && !basenode)
{
- /* Set up a substitution. We reuse CaseTestExpr for this. */
+ /*
+ * Set up a substitution. We abuse CaseTestExpr for this. It's safe
+ * to do so because the only nodes that will be above the CaseTestExpr
+ * in the finished expression will be FieldStore and ArrayRef nodes.
+ * (There could be other stuff in the tree, but it will be within
+ * other child fields of those node types.)
+ */
CaseTestExpr *ctest = makeNode(CaseTestExpr);
ctest->typeId = targetTypeId;