summaryrefslogtreecommitdiff
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.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index c2c1944a0e..244817b867 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -542,11 +542,12 @@ transformAssignedExpr(ParseState *pstate,
/*
* updateTargetListEntry()
- * This is used in UPDATE statements only. It prepares an UPDATE
- * TargetEntry for assignment to a column of the target table.
- * This includes coercing the given value to the target column's type
- * (if necessary), and dealing with any subfield names or subscripts
- * attached to the target column itself.
+ * This is used in UPDATE statements (and ON CONFLICT DO UPDATE)
+ * only. It prepares an UPDATE TargetEntry for assignment to a
+ * column of the target table. This includes coercing the given
+ * value to the target column's type (if necessary), and dealing with
+ * any subfield names or subscripts attached to the target column
+ * itself.
*
* pstate parse state
* tle target list entry to be modified
@@ -1690,6 +1691,10 @@ FigureColnameInternal(Node *node, char **name)
break;
case T_CollateClause:
return FigureColnameInternal(((CollateClause *) node)->arg, name);
+ case T_GroupingFunc:
+ /* make GROUPING() act like a regular function */
+ *name = "grouping";
+ return 2;
case T_SubLink:
switch (((SubLink *) node)->subLinkType)
{