recursing down a tree - Mailing list pgsql-general

From Carl Meyer
Subject recursing down a tree
Date
Msg-id jb0ohu86ct8g27ovvlvsn4rvous07am9fc@4ax.com
Whole thread Raw
Responses Re: recursing down a tree
Re: recursing down a tree
List pgsql-general
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

pgsql-general by date:

Previous
From: "King King"
Date:
Subject: The Rule does not working.
Next
From: "Tomis³aw Kityñski"
Date:
Subject: Re: Wildcards in GROUP BY?