From: | Alexander Korotkov <akorotkov(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Fixes for ChangeVarNodes_walker() |
Date: | 2025-04-29 11:34:55 |
Message-ID: | E1u9jEl-0009f5-31@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fixes for ChangeVarNodes_walker()
This commit fixes two bug in ChangeVarNodes_walker() function.
* When considering RestrictInfo, walk down to its clauses based on the
presense of relid to be deleted not just in clause_relids but also in
required_relids.
* Incrementally adjust num_base_rels based on the change of clause_relids
instead of recalculating it using clause_relids, which could contain
outer-join relids.
Reported-by: Richard Guo <guofenglinux(at)gmail(dot)com>
Discussion: https://postgr.es/m/CAMbWs49PE3CvnV8vrQ0Dr%3DHqgZZmX0tdNbzVNJxqc8yg-8kDQQ%40mail.gmail.com
Author: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Reviewed-by: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/2260c7f6d90ecf76d3806d32890a0890688b41e8
Modified Files
--------------
src/backend/rewrite/rewriteManip.c | 28 ++++++++++++++++++++++++----
src/test/regress/expected/join.out | 16 +++++++++++++++-
src/test/regress/sql/join.sql | 8 +++++++-
3 files changed, 46 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2025-04-29 12:43:48 | pgsql: doc: Small example improvement |
Previous Message | Peter Eisentraut | 2025-04-29 09:38:14 | pgsql: pg_restore: Improve --help synopsis |