From: Alexander Korotkov <akorotkov@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Don't constrain self-join removal due to PHVs
Date: Sun, 24 Dec 2023 23:33:56 +0000
Message-ID: <E1rHXym-00Bl71-8z@gemulon.postgresql.org> (raw)
Don't constrain self-join removal due to PHVs
Self-join removal appears to be safe to apply with placeholder variables
as long as we handle PlaceHolderVar in replace_varno_walker() and replace
relid in phinfo->ph_lateral.
Discussion: https://postgr.es/m/18187-831da249cbd2ff8e%40postgresql.org
Author: Richard Guo
Reviewed-by: Andrei Lepikhov
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b5fb6736ed3b6875e2a4ca39d33325147f535137
Modified Files
--------------
src/backend/optimizer/plan/analyzejoins.c | 18 ++++----------
src/test/regress/expected/join.out | 39 ++++++++++++++++++++++---------
src/test/regress/sql/join.sql | 10 +++++---
3 files changed, 39 insertions(+), 28 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: Don't constrain self-join removal due to PHVs
In-Reply-To: <E1rHXym-00Bl71-8z@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