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

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: BUG #18536: Using WITH inside WITH RECURSIVE triggers a "shouldn't happen" error
Дата
Msg-id CAJ7c6TN-yeXYS27DDd+eaOCRunjSCMNScHYJW-NarUQTC4Bh=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #18536: Using WITH inside WITH RECURSIVE triggers a "shouldn't happen" error  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-bugs
Hi,

> > triggers an error:
> > ERROR:  XX000: missing recursive reference
> > LOCATION:  checkWellFormedRecursion, parse_cte.c:896
>
> FWIW I couldn't reproduce the reported error on REL_17_STABLE
> (b8bf76cbde39). The error I got seems reasonable:
>
> ```
> 46087 (master) =# WITH RECURSIVE t(n) AS (
>     WITH t1 AS (SELECT 1 FROM t) SELECT 1
>     UNION
>     SELECT 1 FROM t1)
> SELECT * FROM t;
> ERROR:  recursive reference to query "t" must not appear within a subquery
> LINE 2:     WITH t1 AS (SELECT 1 FROM t) SELECT 1
>                                       ^
> ```
>
> We should add regression tests though, as v2 does.

Oops. That's because Tom pushed this already (cf588e10f664). Sorry for
the noise.

-- 
Best regards,
Aleksander Alekseev



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

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Re: BUG #18536: Using WITH inside WITH RECURSIVE triggers a "shouldn't happen" error
Следующее
От: Tender Wang
Дата:
Сообщение: Re: BUG #18541: Reattaching a partition referenced by a foreign key fails with an error