pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Wickstrom <danw@rtp.ericsson.se>
To: Martin Smetak <minca_sql@no9.cz>
Cc: pgsql-sql@postgresql.org
Subject: Recursive select
Date: Thu, 24 May 2001 09:44:43 -0400 (EDT)
Message-ID: <15117.4171.867564.863408@gargle.gargle.HOWL> (raw)
In-Reply-To: <009301c0e368$589c0de0$0b01010a@no9.cz>
References: <009301c0e368$589c0de0$0b01010a@no9.cz>

>>>>> "Martin" == Martin Smetak <minca_sql@no9.cz> writes:

    Martin> Hi all!  Anyone know if it's possible to make a recursive
    Martin> select from a table ?  My problem: I got a table of "some
    Martin> categories" which all points to its parrent
    Martin> one(tree)...shown below. And I want to select all names of
    Martin> parrent categories of one child, lets say "fast[4]". Now
    Martin> I'm solving that with many SQL queries like : "SELECT
    Martin> main_id FROM cat WHERE id=4;"....but I would like to
    Martin> optimize this.

    Martin> Anyone can help or point me to a way ??


The Openacs project has implemented a couple of different methods for
handling tree queries.  Check out these two threads:

http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0000eC&topic_id=11&topic=OpenACS

http://openacs.org/bboard/q-and-a-fetch-msg.tcl?msg_id=0000j6&topic_id=12&topic=OpenACS%204%...

Regards,

Dan Wickstrom



view thread (11+ messages)  latest in thread

Message-ID: <15117.4171.867564.863408@gargle.gargle.HOWL>
Permalink:  ../15117.4171.867564.863408@gargle.gargle.HOWL/
Also on:    postgresql.org/message-id/15117.4171.867564.863408@gargle.gargle.HOWL

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: danw@rtp.ericsson.se, minca_sql@no9.cz
  Subject: Re: Recursive select
  In-Reply-To: <15117.4171.867564.863408@gargle.gargle.HOWL>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox