Re: connect by [prior]

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: connect by [prior]
Дата
Msg-id 3ECB994F.5060107@joeconway.com
обсуждение исходный текст
Ответ на Re: connect by [prior]  (Nabil Sayegh <postgresql@e-trolley.de>)
Список pgsql-novice
Nabil Sayegh wrote:
> Am Mit, 2003-05-21 um 10.42 schrieb Gerard TOURRES:
>>I can't find an equivalent for select...connect by (sort data in a
>>tree, beginning at a defined point towards 'son' or 'father').
>>
>>Running Psql 7.2.1 on Debian woody
>
> This is called "WITH RECURSIVE" in SQL '99 and not yet implemented in
> 7.3.1
> But it is possible to write a "stored procedure" (function) that does
> the same thing.

Gerard's question was WRT 7.2.1, not 7.3.1. I'm afraid on 7.2.x you are
pretty much out of luck :-(

If you do upgrade to 7.3.x (7.3.3 ought to be out by next week), then in
contrib/tablefunc there is a function called connectby() that should do
what you're looking for.

There was some discussion about someone implementing SQL '99 "WITH
RECURSIVE" for 7.4, but it doesn't look like that is going to happen --
maybe for 7.5 it will be there.

HTH,

Joe



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postmaster didnt start after power failure.
Следующее
От: Joe Conway
Дата:
Сообщение: Re: parse error when executing a simple plpgsql function