Further improve commentary about ChangeVarNodesWalkExpression()

Alexander Korotkov <akorotkov@postgresql.org>

Commit: 6888658516a20a2605087f557d96f3d0d0937608
Author: Alexander Korotkov <akorotkov@postgresql.org>
Date: 2026-03-24T07:54:00Z
Further improve commentary about ChangeVarNodesWalkExpression()

The updated comment explains why we use ChangeVarNodes_walker() instead of
expression_tree_walker(), and provides a bit more detail about the differences
in processing top-level Query and subqueries.

Author: Alexander Korotkov <aekorotkov@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAPpHfdvbjq342WTQ705Wmqhe8794pcp7wospz%2BWUJ2qB7vuOqA%40mail.gmail.com
Backpatch-through: 18

Files

PathChange+/−
src/backend/rewrite/rewriteManip.c modified +11 −5

Discussion