From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rethink nullingrel marking rules in build_joinrel_tlist().
Date: Tue, 07 Feb 2023 23:26:22 +0000
Message-ID: <E1pPXLx-00276a-DM@gemulon.postgresql.org> (raw)
Rethink nullingrel marking rules in build_joinrel_tlist().
The logic for when to add the current outer join's own relid
to the nullingrels sets of output Vars and PHVs was overly
complicated and underly correct. Not sure why I didn't think
of this before, but since what we want is marking per the
syntactic structure, we can just consult our records about
the syntactic structure, ie syn_righthand/syn_lefthand.
Also, tighten the rule about when to add the commute_above_r
bits, in hopes of eliminating some squishy reasoning. I do not
know of a reason to think that that's broken as-is, but this way
seems better.
Per bug #17781 from Robins Tharakan.
Discussion: https://postgr.es/m/17781-c0405c8b3cd5e072@postgresql.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/fee7b77b9000f35e445de9954a8cbf241f181e60
Modified Files
--------------
src/backend/optimizer/util/relnode.c | 43 +++++++++++++++++++----------------
src/test/regress/expected/join.out | 44 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/join.sql | 28 +++++++++++++++++++++++
3 files changed, 96 insertions(+), 19 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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Rethink nullingrel marking rules in build_joinrel_tlist().
In-Reply-To: <E1pPXLx-00276a-DM@gemulon.postgresql.org>
References: <E1pPXLx-00276a-DM@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