From: | "Arnaud PERE" <arnaud(dot)mlist1(at)free(dot)fr> |
---|---|
To: | "Sheer El-Showk" <sheer(at)saraf(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Cc: | "Trinadh Kavuri" <tkavuri(at)saraf(dot)com>, "Neeran Saraf" <neeran(at)saraf(dot)com> |
Subject: | Re: recursive subquery |
Date: | 2002-04-24 06:22:25 |
Message-ID: | 002c01c1eb58$694a2200$0100a8c0@arp.homelinux.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I have a table with records that have a hierarchical relationship with one
> another. Some records are children of other records which in turn can be
> children of higher level records and so on until the highest level records
> are reached. This is a simple tree relationship. It's being represented
> by a second table with holds parentid-childid tuples so that to find the
> children of a particular parent one only has to scan the second table's
> first field for that given parent's id.
> ...
I think you hae several solutions : this is the emulation of the connect by oracle solution. You could try these links found at http://archives.postgresql.org/pgsql-sql/2001-11/msg00438.php
| There are some in the PostgreSQL Cookbook
| (http://www.brasileiro.net/postgres) and Dan Wickstrom (from OpenACS.org)
| came up with one for OpenACS:
|
| http://openacs.org/new-file-storage/one-file?file_id=123
Good luck
Arnaud
From | Date | Subject | |
---|---|---|---|
Next Message | Jakub Ouhrabka | 2002-04-24 06:47:06 | calling functions in select |
Previous Message | Glen Eustace | 2002-04-24 04:49:23 | Koha Open Source Library System |