pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrei Lepikhov <lepihov@gmail.com>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Avoid mislabeling of lateral references when pulling up a subque
Date: Tue, 03 Dec 2024 11:20:32 -0500
Message-ID: <1822436.1733242832@sss.pgh.pa.us> (raw)
In-Reply-To: <7d8175ca-82bb-4878-8b25-7edb124fac21@gmail.com>
References: <E1tGn4j-0003zi-MP@gemulon.postgresql.org>
	<7d8175ca-82bb-4878-8b25-7edb124fac21@gmail.com>

Andrei Lepikhov <lepihov@gmail.com> writes:
> Pardon the noise, but I'm curious why the optimiser must choose NestLoop 
> in the case of lateral reference.

To pass down the current outer row's value of the lateral reference.

> It would be nice to provide alternatives. Because now we have some 
> corner cases.

That's a fairly bizarre case, and I'm not at all convinced that
the old plan was correct.

			regards, tom lane





view thread (15+ messages)

Message-ID: <1822436.1733242832@sss.pgh.pa.us>
Permalink:  ../1822436.1733242832@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1822436.1733242832@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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, lepihov@gmail.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid mislabeling of lateral references when pulling up a subque
  In-Reply-To: <1822436.1733242832@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox