Re: [HACKERS] WITH RECURSIVE patch V0.1

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: [HACKERS] WITH RECURSIVE patch V0.1
Дата
Msg-id 20080519084223.GA14142@svana.org
обсуждение исходный текст
Ответ на Re: WITH RECURSIVE patch V0.1  (Zoltan Boszormenyi <zb@cybertec.at>)
Ответы Re: [HACKERS] WITH RECURSIVE patch V0.1  (Zoltan Boszormenyi <zb@cybertec.at>)
Re: [HACKERS] WITH RECURSIVE patch V0.1  (Zoltan Boszormenyi <zb@cybertec.at>)
Re: [HACKERS] WITH RECURSIVE patch V0.1  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-patches
On Mon, May 19, 2008 at 08:19:17AM +0200, Zoltan Boszormenyi wrote:
> >The standard has a clause to specify depth-first order. However doing a
> >depth-first traversal would necessitate quite a different looking plan and
> >it's far less obvious (to me anyways) how to do it.
>
> That would be even cooler to have it implemented as well.

From an implementation point of view, the only difference between
breadth-first and depth-first is that your tuplestore needs to be LIFO
instead of FIFO. However, just looking at the plan I don't know whether
it could support that kind of usage. At the very least I don't think
the standard tuplestore code can handle it.

> >Well, psql might wait and wait but it's actually receiving rows. A cleverer
> >client should be able to deal with infinite streams of records.
>
> I think it's the other way around. The server should not emit infinite
> number of records.

The server won't, the universe will end first. This is a nice example
of the halting problem:

http://en.wikipedia.org/wiki/Halting_problem

Which was proved unsolvable a long time ago.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

Вложения

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

Предыдущее
От: Zoltan Boszormenyi
Дата:
Сообщение: Re: WITH RECURSIVE patch V0.1
Следующее
От: Yoshiyuki Asaba
Дата:
Сообщение: Re: WITH RECURSIVE patch V0.1