Re: BUG #12760: Lateral files with more than 2 laterals - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #12760: Lateral files with more than 2 laterals
Date
Msg-id 2882.1423609928@sss.pgh.pa.us
Whole thread Raw
In response to BUG #12760: Lateral files with more than 2 laterals  (moe1234512345@gmail.com)
List pgsql-bugs
moe1234512345@gmail.com writes:
> set geqo_threshold  = 2;

> SELECT *
> FROM generate_series(1, 1) A,
> lateral ( SELECT B from generate_series(1, 1) B where B = A limit 1 ) AS
> B0,
> lateral ( SELECT C from generate_series(1, 1) C where C = A and C != B limit
> 1 ) AS C0

It's a good idea to show what problem you're seeing, though in this case
I didn't have much trouble reproducing it:

regression=# SELECT *
FROM generate_series(1, 1) A,
lateral ( SELECT B from generate_series(1, 1) B where B = A limit 1 ) AS B0,
lateral ( SELECT C from generate_series(1, 1) C where C = A and C = B limit 1 ) AS C0;
ERROR:  failed to join all relations together

Will look, thanks for the report!

            regards, tom lane

pgsql-bugs by date:

Previous
From: Stephen Frost
Date:
Subject: Re: BUG #12760: Lateral files with more than 2 laterals
Next
From: Tom Lane
Date:
Subject: Re: BUG #12760: Lateral files with more than 2 laterals