Small query using LATERAL that segfaults Postgres

From: Tom Ellis <tom-lists-postgresql(dot)org(at)jaguarpaw(dot)co(dot)uk>
To: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Small query using LATERAL that segfaults Postgres
Date: 2020-07-13 17:51:24
Message-ID: 20200713175124.GQ8220@cloudinit-builder
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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"

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2020-07-13 18:27:25 Re: Small query using LATERAL that segfaults Postgres
Previous Message Arne Roland 2020-07-13 13:14:38 Re: BUG #16153: foreign key update should probably move dependent rows in the case of tuple rerouting