From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Refactor ChangeVarNodesExtended() using the custom callback
Date: Wed, 07 May 2025 08:15:26 +0000
Message-ID: <E1uCZw6-000aRI-13@gemulon.postgresql.org> (raw)
Refactor ChangeVarNodesExtended() using the custom callback
fc069a3a6319 implemented Self-Join Elimination (SJE) and put related logic
to ChangeVarNodes_walker(). This commit provides refactoring to remove the
SJE-related logic from ChangeVarNodes_walker() but adds a custom callback to
ChangeVarNodesExtended(), which has a chance to process a node before
ChangeVarNodes_walker(). Passing this callback to ChangeVarNodesExtended()
allows SJE-related node handling to be kept within the analyzejoins.c.
Reported-by: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs49PE3CvnV8vrQ0Dr%3DHqgZZmX0tdNbzVNJxqc8yg-8kDQQ%40mail.gmail.com
Author: Andrei Lepikhov <lepihov@gmail.com>
Author: Alexander Korotkov <aekorotkov@gmail.com>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ab42d643c14509cf1345588f55d798284b11a91e
Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 160 +++++++++++++++++++++++++++---
src/backend/rewrite/rewriteManip.c | 138 ++++++--------------------
src/include/rewrite/rewriteManip.h | 17 +++-
src/tools/pgindent/typedefs.list | 1 +
4 files changed, 192 insertions(+), 124 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: akorotkov@postgresql.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Refactor ChangeVarNodesExtended() using the custom callback
In-Reply-To: <E1uCZw6-000aRI-13@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox