pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrey Lepikhov <a.lepikhov@postgrespro.ru>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Date: Fri, 21 Apr 2023 17:11:04 +0500
Message-ID: <29b06792-77f4-9aad-09a0-58e98399448d@postgrespro.ru> (raw)
In-Reply-To: <CAMbWs49H5ObtEdg-65gkXvmnHSedHpwa0rdQrjoOh7iWCLRgXQ@mail.gmail.com>
References: <0b819232-4b50-f245-1c7d-c8c61bf41827@postgrespro.ru>
	<CAMbWs4_HJNuLv9HDReEBDrQrCPV-uqpVOecoJkurprnY+Do9Fg@mail.gmail.com>
	<CAMbWs4_8EZU4DetHyZGm1CwCxUhBdWpRnA9dtM-Z82i=bVKA6A@mail.gmail.com>
	<CAMbWs4_XcPHqc=A=36cxvJRhkjAgEeJtOFLOnBPEfQYGqnGOCw@mail.gmail.com>
	<efb33bee-145d-95a8-1048-2e7b8f282e2c@postgrespro.ru>
	<CAMbWs48FHw_tTXSbA-_MPaeu7S7JCt6Xs-gxwkx=pvLiwC6eTg@mail.gmail.com>
	<c69bd07e-1175-10da-9ac0-4bfe59235ac2@postgrespro.ru>
	<402433.1677524538@sss.pgh.pa.us>
	<2663884e-769a-b298-55b0-014c5a1ee55c@postgrespro.ru>
	<524303.1677538463@sss.pgh.pa.us>
	<999171.1677611407@sss.pgh.pa.us>
	<CAMbWs4-_KdVEJ62o6KbtA+_KJnQa7WZCc48VsPQ9in6TSN0Kxg@mail.gmail.com>
	<CAMbWs48atP+s4LdPF9-d7EV_ttnmTdTJwYdgGQ_dpJ34bL-WCA@mail.gmail.com>
	<CAMbWs49CB3txv_s3SwC1L2h1DiUPAn+v0-O4UFfg33b+HXNnTg@mail.gmail.com>
	<a83e8e21-ee4a-8b33-7ea5-8d0f754c8567@postgrespro.ru>
	<CAMbWs49H5ObtEdg-65gkXvmnHSedHpwa0rdQrjoOh7iWCLRgXQ@mail.gmail.com>

On 4/21/23 14:34, Richard Guo wrote:
> 
> On Thu, Apr 20, 2023 at 1:06 PM Andrey Lepikhov 
> <a.lepikhov@postgrespro.ru <mailto:a.lepikhov@postgrespro.ru>> wrote:
> Are you worried about upper clauses who reference to C vars?  In the
> second form when we've formed A/B join, which would have both outer
> joins' relids in its relid set, the upper clause will be able to be
> applied there, and it is the correct join level.
Yes, of course. I thought about the case with INNER JOINs in between, 
something like that:
a LEFT JOIN b ON b.x INNER JOIN c ON (b.x=c.x) LEFT JOIN d ON b.x ...
But, it is still a doubt.
> 
> BTW, cfbot reminds that a rebase is needed.  So re-attach the two
> patches.  Now I think it should be in 'Needs review' again in CF.  I'll
> go and do the change.
Thanks!

-- 
Regards
Andrey Lepikhov
Postgres Professional






view thread (46+ messages)  latest in thread

Message-ID: <29b06792-77f4-9aad-09a0-58e98399448d@postgrespro.ru>
Permalink:  ../29b06792-77f4-9aad-09a0-58e98399448d@postgrespro.ru/
Also on:    postgresql.org/message-id/29b06792-77f4-9aad-09a0-58e98399448d@postgrespro.ru

 · 

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: a.lepikhov@postgrespro.ru, guofenglinux@gmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
  In-Reply-To: <29b06792-77f4-9aad-09a0-58e98399448d@postgrespro.ru>

* 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