aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2022-10-24 12:52:43 +0200
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2022-10-24 12:52:43 +0200
commit3b2db22fe287d17ecb0ba4cd828dc7900dddd03f (patch)
tree25254ec152e7c13cd94a8a6aa072b40c2e54d66f /src/backend/parser/parse_clause.c
parent8328a15f8f95cad3fa99bbab551cade0a8403708 (diff)
downloadpostgresql-3b2db22fe287d17ecb0ba4cd828dc7900dddd03f.tar.gz
postgresql-3b2db22fe287d17ecb0ba4cd828dc7900dddd03f.zip
Update some comments that should've covered MERGE
Oversight in 7103ebb7aae8. Backpatch to 15. Author: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAMbWs48gnDjZXq3-b56dVpQCNUJ5hD9kdtWN4QFwKCEapspNsA@mail.gmail.com
Diffstat (limited to 'src/backend/parser/parse_clause.c')
-rw-r--r--src/backend/parser/parse_clause.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c
index c2b5474f5f7..e01c0734d17 100644
--- a/src/backend/parser/parse_clause.c
+++ b/src/backend/parser/parse_clause.c
@@ -153,7 +153,7 @@ transformFromClause(ParseState *pstate, List *frmList)
/*
* setTargetTable
- * Add the target relation of INSERT/UPDATE/DELETE to the range table,
+ * Add the target relation of INSERT/UPDATE/DELETE/MERGE to the range table,
* and make the special links to it in the ParseState.
*
* We also open the target relation and acquire a write lock on it.
@@ -163,7 +163,9 @@ transformFromClause(ParseState *pstate, List *frmList)
*
* If alsoSource is true, add the target to the query's joinlist and
* namespace. For INSERT, we don't want the target to be joined to;
- * it's a destination of tuples, not a source. For UPDATE/DELETE,
+ * it's a destination of tuples, not a source. MERGE is actually
+ * both, but we'll add it separately to joinlist and namespace, so
+ * doing nothing (like INSERT) is correct here. For UPDATE/DELETE,
* we do need to scan or join the target. (NOTE: we do not bother
* to check for namespace conflict; we assume that the namespace was
* initially empty in these cases.)