Re: Querying Hierarchical Data - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Querying Hierarchical Data
Date
Msg-id 200303031034.48165.josh@agliodbs.com
Whole thread Raw
In response to Querying Hierarchical Data  ("Eric" <someone@somewhere.com>)
List pgsql-sql
Eric,

> How do I access hierarchical data under PostgreSQL?
> Does it have SQL command similar to Oracle's CONNECT BY?

Joe Conway wrote CONNECT BY as a function.  It's in /contrib in your
PostgreSQL source for versions 7.3.0 and above, in /contrib/tablefunc I
think.  There is also a different tree implementation in /contrib/ltree.

If that doesn't work for you, there are a number of different solutions to the
tree structure problem, and sample implementations of all of them on
PostgreSQL can be found through the web.  Joe Celko covers three of them in
"SQL for Smarties".

--
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-sql by date:

Previous
From: Robert Treat
Date:
Subject: Re: Querying Hierarchical Data
Next
From: Tom Lane
Date:
Subject: Re: OUTER JOIN with filter