public inbox for [email protected]
help / color / mirror / Atom feedFrom: Alexander Korotkov <[email protected]>
To: [email protected]
Subject: pgsql: Replace lateral references to removed rels in subqueries
Date: Fri, 23 Feb 2024 22:35:31 +0000
Message-ID: <[email protected]> (raw)
Replace lateral references to removed rels in subqueries
This commit introduces a new field 'sublevels_up' in ReplaceVarnoContext,
and enhances replace_varno_walker() to:
1) recurse into subselects with sublevels_up increased, and
2) perform the replacement only when varlevelsup is equal to sublevels_up.
This commit also fixes some outdated comments. And besides adding relevant
test cases, it makes some unification over existing SJE test cases.
Discussion: https://postgr.es/m/CAMbWs4-%3DPO6Mm9gNnySbx0VHyXjgnnYYwbN9dth%3DTLQweZ-M%2Bg%40mail.gmail.com
Author: Richard Guo
Reviewed-by: Andrei Lepikhov, Alexander Korotkov
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/466979ef031afff000f3f92b812b946cf3a416c1
Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 147 ++++++++--------
src/test/regress/expected/join.out | 278 +++++++++++++++---------------
src/test/regress/sql/join.sql | 218 ++++++++++++-----------
3 files changed, 337 insertions(+), 306 deletions(-)
reply
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: [email protected]
Cc: [email protected], [email protected]
Subject: Re: pgsql: Replace lateral references to removed rels in subqueries
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox