This small query results in "error: no relation entry for relid 11" in
Postgres 12 and 13 (beta) on db-fiddle.com. It runs fine in Posgres
11.
Tom
SELECT 0
FROM
(SELECT 0) as "T1"
LEFT OUTER JOIN
(SELECT * FROM (SELECT *
FROM
(SELECT
0) as "T1"
LEFT OUTER JOIN
(SELECT
TRUE as "r") as "T2"
ON
TRUE) as "T1",
LATERAL
(SELECT
TRUE as "b"
UNION ALL
SELECT
CASE WHEN "r" THEN TRUE ELSE TRUE END as "b") as "T2"
) as "T2"
ON
"b"