you certainly need our "famous" module contrib/tree
Documentation is sparse and written in english but some people in
mailing list already use it.
On Fri, 28 Jun 2002, Carl Meyer wrote:
> say i have a table with something like
> 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
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
In response to
pgsql-general by date
|Next:||From: Manfred Koizar||Date: 2002-06-28 13:42:08|
|Subject: Re: Acessing columns of parent tables with PL/pgSQL|
|Previous:||From: Tom Lane||Date: 2002-06-28 13:37:16|
|Subject: Re: One source of constant annoyance identified |