agora inbox for pgsql-bugs@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Matheus Alcantara <matheusssilv97@gmail.com>
Cc: leis@in.tum.de
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19553: Wrong results from nested LEFT JOINs over an empty subquery (regression since v16)
Date: Sun, 19 Jul 2026 22:35:28 -0400
Message-ID: <1065899.1784514928@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs49H275KzgZr3Cd1Hy+6Lmwp35bZ+5PrVc62k3HDLj6hNQ@mail.gmail.com>
References: <19553-4561747f93f368a7@postgresql.org>
	<DK0CT1H1TW0G.3AJAOZTZJVTLL@gmail.com>
	<3824828.1784244210@sss.pgh.pa.us>
	<DK0XT8FDBCLK.A43UXISCEHW9@gmail.com>
	<3957687.1784308823@sss.pgh.pa.us>
	<CAMbWs4_RLwtwV9v7AUiA6YeY=WeCsHeEBn6xO3tzTVRq2F5VSA@mail.gmail.com>
	<298498.1784398271@sss.pgh.pa.us>
	<CAMbWs49H275KzgZr3Cd1Hy+6Lmwp35bZ+5PrVc62k3HDLj6hNQ@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
> It occurred to me that we can skip the new get_relids_in_jointree()
> scan altogether when there are no PHVs anywhere in the query
> (root->glob->lastPHId==0), since then the find_dependent_phvs() checks
> are no-ops anyway.  This is also consistent with how we check
> root->glob->lastPHId in find_dependent_phvs() and
> find_dependent_phvs_in_jointree().  Attached is a trivial patch doing
> that.

WFM.

			regards, tom lane





view thread (13+ messages)  latest in thread

Message-ID: <1065899.1784514928@sss.pgh.pa.us>
Permalink:  ../1065899.1784514928@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1065899.1784514928@sss.pgh.pa.us

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: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, guofenglinux@gmail.com, matheusssilv97@gmail.com, leis@in.tum.de, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #19553: Wrong results from nested LEFT JOINs over an empty subquery (regression since v16)
  In-Reply-To: <1065899.1784514928@sss.pgh.pa.us>

* 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