Pg18 Recursive Crash

From: Paul Ramsey <pramsey(at)cleverelephant(dot)ca>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Pg18 Recursive Crash
Date: 2024-12-16 17:50:39
Message-ID: 99F064C1-B3EB-4BE7-97D2-D2A0AA487A71@cleverelephant.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Apologies if this is already reported, but there’s a crasher in recursive queries at the head of the current development that happened to be exercised by our regression suite. Here is a core-only reproduction.

CREATE TABLE foo (id integer, x integer, y integer);
INSERT INTO foo VALUES (1, 0, 1);
INSERT INTO foo VALUES (2, 1, 2);
INSERT INTO foo VALUES (3, 2, 3);

WITH RECURSIVE path (id, x, y) AS (
SELECT id, x, y FROM foo WHERE id = 1
UNION
SELECT foo.id, foo.x, foo.y
FROM path, foo
WHERE path.y = foo.x
)
SELECT 'crash', id, x, y FROM path;

Thanks!
ATB,
P

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-12-16 17:51:49 Re: Improved psql tab completion for joins
Previous Message Jeff Davis 2024-12-16 17:49:22 Re: Add CASEFOLD() function.