Re: Making Vars outer-join aware

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>
Subject: Re: Making Vars outer-join aware
Date: 2023-02-13 18:48:07
Message-ID: 20230213184807.GF1653@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 13, 2023 at 03:33:15PM +0800, Richard Guo wrote:
> On Mon, Feb 13, 2023 at 7:58 AM Justin Pryzby <pryzby(at)telsasoft(dot)com> wrote:
> > The patch broke this query:
> >
> > select from pg_inherits inner join information_schema.element_types
> > right join (select from pg_constraint as sample_2) on true
> > on false, lateral (select scope_catalog, inhdetachpending from
> > pg_publication_namespace limit 3);
> > ERROR: could not devise a query plan for the given query

> BTW, here is a simplified query that can trigger this issue on HEAD.
>
> select * from t1 inner join t2 left join (select null as c from t3 left
> join t4 on true) as sub on true on true, lateral (select c, t1.a from t5
> offset 0 ) ss;

It probably doesn't need to be said that the original query was reduced
from sqlsmith... But I mention that now to make it searchable.

Thanks,
--
Justin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jacob Champion 2023-02-13 18:49:17 [PATCH] Align GSS and TLS error handling in PQconnectPoll()
Previous Message Stephen Frost 2023-02-13 18:45:41 Re: Adding "large" to PG_TEST_EXTRA