X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 7439011F6779 for ; Sun, 9 Apr 2006 22:14:40 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 1.119 X-Spam-Level: * X-Spam-Status: No, score=1.119 required=5 tests=[AWL=-0.213, RCVD_IN_BL_SPAMCOP_NET=1.332] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id Onh3PkDFK+gP for ; Sun, 9 Apr 2006 22:14:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [151.155.5.143]) by postgresql.org (Postfix) with ESMTP id 49A0E11F6668 for ; Sun, 9 Apr 2006 22:14:36 -0300 (ADT) Received: from [172.16.1.180] grzm [61.197.227.146] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 1.6 $ on Linux; Sun, 09 Apr 2006 19:14:11 -0600 In-Reply-To: <200604070028.15476.db@kavod.com> References: <200604070028.15476.db@kavod.com> Mime-Version: 1.0 (Apple Message framework v749.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Modeling trees with Nested Sets and Nested Intervals Date: Mon, 10 Apr 2006 10:14:07 +0900 To: Daniel Browning X-Mailer: Apple Mail (2.749.3) X-Archive-Number: 200604/60 X-Sequence-Number: 24869 On Apr 7, 2006, at 16:28 , Daniel Browning wrote: > * Static Hierarchies and Binary Fractions in PostgreSQL, by Michael > Glaesemann > http://www.grzm.com/fornow/archives/2004/07/10/static_hierarchies > > This is the most complete out-of-the-box solution I've found. I wrote up Tropashko's method because I had found enough material on the nested set method on the web to apply it to PostgreSQL (which works quite well once you get it set up) and was interested in seeing what else was out there. Though, as you note, there's no ready-to-go nested set solution specifically for PostgreSQL. You may also want to take a look at contib/ltree in the PostgreSQL sources for handling hierarchical data. I haven't used it myself, but many others smarter than me have reported satisfaction with it. If you start implementing the nested set method and have some questions, feel free to post them here. I'm sure someone will be able to answer them. Good luck! Michael Glaesemann grzm myrealbox com