BUG #18536: Using WITH inside WITH RECURSIVE triggers a "shouldn't happen" error

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #18536: Using WITH inside WITH RECURSIVE triggers a "shouldn't happen" error
Дата
Msg-id 18536-0a342ec07901203e@postgresql.org
обсуждение исходный текст
Ответы Re: BUG #18536: Using WITH inside WITH RECURSIVE triggers a "shouldn't happen" error
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18536
Logged by:          Alexander Lakhin
Email address:      exclusion@gmail.com
PostgreSQL version: 17beta2
Operating system:   Ubuntu 22.04
Description:

The following query:
WITH RECURSIVE t(n) AS (
    WITH t1 AS (SELECT 1 FROM t) SELECT 1
    UNION
    SELECT 1 FROM t1)
SELECT * FROM t;

triggers an error:
ERROR:  XX000: missing recursive reference
LOCATION:  checkWellFormedRecursion, parse_cte.c:896

which is seemingly not expected:
        if (cstate->selfrefcount != 1)  /* shouldn't happen */
            elog(ERROR, "missing recursive reference");


В списке pgsql-bugs по дате отправления: