Re: WITH RECURSIVE patch V0.1

Поиск
Список
Период
Сортировка
От Zoltan Boszormenyi
Тема Re: WITH RECURSIVE patch V0.1
Дата
Msg-id 48314EC1.5070504@cybertec.at
обсуждение исходный текст
Ответ на Re: WITH RECURSIVE patch V0.1  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: WITH RECURSIVE patch V0.1  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-hackers
Martijn van Oosterhout írta:
> 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.

Are you sure? I think a LIFO tuplestore would simply return reversed
breadth-first order. Depth-first means for every new record descend into
another recursion first then continue with the next record on the right.

> 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.
>


--
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/



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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: triggers on prepare, commit, rollback... ?
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: WITH RECURSIVE patch V0.1