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