Re: BUG #6498: with recursive / union all

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #6498: with recursive / union all
Дата
Msg-id 7426.1330548528@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #6498: with recursive / union all  (nish2575@gmail.com)
Ответы Re: BUG #6498: with recursive / union all  ("k/a" <nish2575@gmail.com>)
Список pgsql-bugs
nish2575@gmail.com writes:
> this doesn't loop infinitely:

>  insert into acyc values ('a','b') ,('b','c');

>  with recursive paths as (
> select frm, too, 1 as lvl from acyc
> union all
> select fnd.frm, a.too, lvl + 1 from acyc a join paths fnd on fnd.too =
> a.frm ) select * from paths;

Why would it?  You don't have any loops in the data.  In particular that
means there will be no join matches after a certain number of levels.

            regards, tom lane

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

Предыдущее
От: Ryan Lowe
Дата:
Сообщение: Re: BUG #6497: Error sent to client, but data written anyway
Следующее
От: Christophe Pettus
Дата:
Сообщение: Re: BUG #6497: Error sent to client, but data written anyway