Re: [PATCH] Allow multiple recursive self-references

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] Allow multiple recursive self-references
Дата
Msg-id 11726e7f-cb50-fb79-dff6-4c409985538c@enterprisedb.com
обсуждение исходный текст
Ответ на Re: [PATCH] Allow multiple recursive self-references  (Denis Hirn <denis.hirn@uni-tuebingen.de>)
Ответы Re: [PATCH] Allow multiple recursive self-references  (Denis Hirn <denis.hirn@uni-tuebingen.de>)
Список pgsql-hackers
I tested the following query (from SQLite documentation):

CREATE TABLE edge(aa INT, bb INT);

WITH RECURSIVE nodes(x) AS (
    SELECT 59
    UNION
    SELECT aa FROM edge JOIN nodes ON bb=x
    UNION
    SELECT bb FROM edge JOIN nodes ON aa=x
)
SELECT x FROM nodes;

ERROR:  42P19: recursive reference to query "nodes" must not appear 
within its non-recursive term
LINE 4:    SELECT aa FROM edge JOIN nodes ON bb=x
                                     ^
LOCATION:  checkWellFormedRecursionWalker, parse_cte.c:960

This well-formedness check apparently needs to be enhanced to allow for 
more than two branches in the union.



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

Предыдущее
От: Daniel Gustafsson
Дата:
Сообщение: Re: [PATCH] Add OAUTH2_SCOPE variable for scope configuration
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: Re: Avoid repeated PQfnumber() in pg_dump