Small query using LATERAL that segfaults Postgres
Tom Ellis <tom-lists-postgresql.org@jaguarpaw.co.uk>
From: Tom Ellis <tom-lists-postgresql.org@jaguarpaw.co.uk>
To: pgsql-bugs@lists.postgresql.org
Date: 2020-07-13T17:51:24Z
Lists: pgsql-bugs
This small query seems to segfault Postgres. I've tried on the
version of Postgres 11 that comes with Debian Stable and all versions
on https://www.db-fiddle.com/ including 13 (Beta). DB Fiddle actually
says "An unexpected error occurred." but I suspect that's the
segfault.
Tom
SELECT
0
FROM (SELECT
TRUE as "r",
SUM(0)
) as "T1",
LATERAL
(SELECT TRUE as "b"
UNION ALL
SELECT
"r" as "b"
FROM (SELECT 0 ORDER BY COALESCE(0)) as "T1"
) as "T2"
WHERE "b"
Commits
-
Cope with lateral references in the quals of a subquery RTE.
- dc6bb09949c8 9.6.19 landed
- d3b642ad99e9 12.4 landed
- 80d8f6d1d633 9.5.23 landed
- 6443cd2e2421 10.14 landed
- 3753df8f8ae8 11.9 landed
- a742ecf9c63d 14.0 landed
- 0734dbc45034 13.0 landed