Skip site navigation (1) Skip section navigation (2)

Re: functionality like Oracle's "connect by"

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: David Parker <dparker(at)tazznetworks(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: functionality like Oracle's "connect by"
Date: 2004-08-31 10:44:15
Message-ID: Pine.GSO.4.58.0408311443210.5201@ra.sai.msu.su (view raw or flat)
Thread:
Lists: pgsql-general
David,

I suggest our search on postgresql resources:
http://www.pgsql.ru/db/pgsearch/index.html?q=%22connect+by%22+oracle


	Oleg

On Mon, 30 Aug 2004, David Parker wrote:

> I know this question has been discussed, probably multiple times, but I
> can't seem to access archives.postgresql.org today....
>
> I need to select all the rows in a table with two fields: parent_id and
> child_id that participate in the same logical "tree". In other words,
> given an id value, I want to find where child_id = my-value, and then
> retrieve the values in the tree above it.
>
> The functionality I'm looking for is essentially the Oracle "connect
> by". Does anything like this exist for postgresql? If not, does anybody
> have a clever solution? (My not-so-clever first pass involved recursing
> in my Java program, but the stack-space-abuse police are knocking on my
> door....)
>
> Again, apologies for asking something that's probably already been
> discussed ad nauseum on this list...
>
> -  DAP
> ======================================================
> David Parker    Tazz Networks    (401) 709-5130
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

	Regards,
		Oleg
_____________________________________________________________
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: Elie NacacheDate: 2004-08-31 11:34:00
Subject: Re: Hebrew support -- please help !
Previous:From: Katsaros Kwn/nosDate: 2004-08-31 10:32:52
Subject: Storing a query plan to disc...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group