Re: pgsql: Avoid mislabeling of lateral references when pulling up a subque

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Avoid mislabeling of lateral references when pulling up a subque
Date: 2024-12-03 16:20:32
Message-ID: 1822436.1733242832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Andrei Lepikhov <lepihov(at)gmail(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Álvaro Herrera 2024-12-03 16:51:41 pgsql: Fix synchronized_standby_slots GUC check hook
Previous Message Álvaro Herrera 2024-12-03 15:00:08 pgsql: Drop "Lock" suffix from LWLock wait event names