summaryrefslogtreecommitdiff
path: root/src/backend/rewrite
diff options
context:
space:
mode:
authorRichard Guo <rguo@postgresql.org>2025-11-05 12:29:31 +0900
committerRichard Guo <rguo@postgresql.org>2025-11-05 12:29:31 +0900
commit59dec6c0b09f717e4ce78d54f578d56ef93bcc53 (patch)
treec56a337300c154078fdb791e102716c3c5fbefbc /src/backend/rewrite
parent2fc31079624e16d6b1a8508958dbf81e8edce057 (diff)
Fix comments for ChangeVarNodes() and related functions
The comment for ChangeVarNodes() refers to a parameter named change_RangeTblRef, which does not exist in the code. The comment for ChangeVarNodesExtended() contains an extra space, while the comment for replace_relid_callback() has an awkward line break and a typo. This patch fixes these issues and revises some sentences for smoother wording. Oversights in commits ab42d643c and fc069a3a6. Author: Richard Guo <guofenglinux@gmail.com> Discussion: https://postgr.es/m/CAMbWs480j16HC1JtjKCgj5WshivT8ZJYkOfTyZAM0POjFomJkg@mail.gmail.com Backpatch-through: 18
Diffstat (limited to 'src/backend/rewrite')
-rw-r--r--src/backend/rewrite/rewriteManip.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c
index cd786aa4112..0fcd1fbd14e 100644
--- a/src/backend/rewrite/rewriteManip.c
+++ b/src/backend/rewrite/rewriteManip.c
@@ -542,8 +542,6 @@ offset_relid_set(Relids relids, int offset)
* (identified by sublevels_up and rt_index), and change their varno fields
* to 'new_index'. The varnosyn fields are changed too. Also, adjust other
* nodes that contain rangetable indexes, such as RangeTblRef and JoinExpr.
- * Specifying 'change_RangeTblRef' to false allows skipping RangeTblRef.
- * See ChangeVarNodesExtended for details.
*
* NOTE: although this has the form of a walker, we cheat and modify the
* nodes in-place. The given expression tree should have been copied
@@ -664,17 +662,16 @@ ChangeVarNodes_walker(Node *node, ChangeVarNodes_context *context)
}
/*
- * ChangeVarNodesExtended - similar to ChangeVarNodes, but with an additional
+ * ChangeVarNodesExtended - similar to ChangeVarNodes, but with an additional
* 'callback' param
*
- * ChangeVarNodes changes a given node and all of its underlying nodes.
- * This version of function additionally takes a callback, which has a
- * chance to process a node before ChangeVarNodes_walker. A callback
- * returns a boolean value indicating if given node should be skipped from
- * further processing by ChangeVarNodes_walker. The callback is called
- * only for expressions and other children nodes of a Query processed by
- * a walker. Initial processing of the root Query doesn't involve the
- * callback.
+ * ChangeVarNodes changes a given node and all of its underlying nodes. This
+ * version of function additionally takes a callback, which has a chance to
+ * process a node before ChangeVarNodes_walker. A callback returns a boolean
+ * value indicating if the given node should be skipped from further processing
+ * by ChangeVarNodes_walker. The callback is called only for expressions and
+ * other children nodes of a Query processed by a walker. Initial processing
+ * of the root Query doesn't involve the callback.
*/
void
ChangeVarNodesExtended(Node *node, int rt_index, int new_index,