Re: Fix comments for ChangeVarNodes() and related functions

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Richard Guo <guofenglinux@gmail.com>, Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-11-03T12:14:08Z
Lists: pgsql-hackers
On 23.10.25 10:59, Richard Guo wrote:
> I happend to notice this comment for ChangeVarNodes():
> 
>   * Specifying 'change_RangeTblRef' to false allows skipping RangeTblRef.
>   * See ChangeVarNodesExtended for details.
> 
> However, I couldn't find "change_RangeTblRef" anywhere in the code
> base.  I suspect this is a leftover from development.  In any case, I
> think we should fix it.

It appears that change_RangeTblRef was removed in commit ab42d643c14 but 
the comments were not fully adjusted.




Commits

  1. Fix comments for ChangeVarNodes() and related functions

  2. Refactor ChangeVarNodesExtended() using the custom callback