Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0FGXrV14924 for ; Tue, 15 Jan 2002 11:33:53 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.2) with HTTP id 601997; Tue, 15 Jan 2002 08:33:55 -0800 From: "Josh Berkus" Subject: Re: Hierarchical queries To: Paulo Rodrigues , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.2 Date: Tue, 15 Jan 2002 08:33:55 -0800 Message-ID: In-Reply-To: <3C4430FF.30803@vianetworks.pt> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200201/169 X-Sequence-Number: 6255 Paulo, > how do you usually handle hierarchical (tree-like) queries? I'm sure someone > else needed this already. Yup! Please see: http://techdocs.postgresql.org/ ... which has at least one article on trees. Also, Joe Celko's book, SQL for Smarties ( reviewed at http://techdocs.postgresql.org/bookreviews.php ) has chapters on the two main approaches to tree structures in fairly exhaustive detail. Buy the book. Or, the condensed version of some of that information was posted to the list by Joe Celko last summer; you can hunt for it in the archives. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco