Re: recursing down a tree - Mailing list pgsql-general

From Oleg Bartunov
Subject Re: recursing down a tree
Date
Msg-id Pine.GSO.4.44.0206281638220.13076-100000@ra.sai.msu.su
Whole thread Raw
In response to recursing down a tree  (Carl Meyer <mrbz@gmx.net>)
List pgsql-general
Carl,

you certainly need our "famous" module contrib/tree
(http://www.sai.msu.su/~megera/postgres/gist/)
Documentation is sparse and written in english but some people in
mailing list already use it.

    Oleg

On Fri, 28 Jun 2002, Carl Meyer wrote:

> hi,
>
> say i have a table with something like
>
> id,parent,description
>
> and parent points to an id of the very same table. now i have
> a specific id and i want to recurse down the tree to the root.
> is it in any way possible to do that without to doing a sql query
> for each level ? until today i always saved the parent and formulated
> a new query using it to get the next upper level. however, it seems to
> me that this might be quite some work given a tree of a larger size.
>
> thanks for your ideas
> carl
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
>

    Regards,
        Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83




pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: One source of constant annoyance identified
Next
From: Manfred Koizar
Date:
Subject: Re: Acessing columns of parent tables with PL/pgSQL