Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by postgresql.org (Postfix) with ESMTP id 31264475B6E for ; Fri, 8 Mar 2002 14:00:18 -0500 (EST) Received: from fwd00.sul.t-online.de by mailout02.sul.t-online.com with smtp id 16jPJ0-0000Ob-01; Fri, 08 Mar 2002 19:41:26 +0100 Received: from cascal.vtb (520013531845-0001@[217.85.3.239]) by fmrl00.sul.t-online.com with esmtp id 16jPIx-1IAr68C; Fri, 8 Mar 2002 19:41:23 +0100 Received: from ksueber by cascal.vtb with local (Exim 3.34 #1 (Debian)) id 16jPFr-00023P-00 for ; Fri, 08 Mar 2002 19:38:11 +0100 Date: Fri, 8 Mar 2002 19:38:11 +0100 To: pgsql-sql@postgresql.org Subject: Support for "nested sets" and PHP (Re: Recursive select) Message-ID: <20020308183811.GA7536@web.de> References: <20011029154754.A11730@cc.usu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.3.27i X-No-Archive: yes From: knut.suebert@web.de X-Sender: 520013531845-0001@t-dialin.net X-Archive-Number: 200203/102 X-Sequence-Number: 6983 --CELKO-- schrieb: > The usual example of a tree structure in SQL books is called an > adjacency list model and it looks like this: > Another way of representing trees is to show them as nested sets. Hello, I thought a while about those nested sets to avoid recursive selects. Made a few functions. Some of the expensive stuff seems to be solved by introducing a 3rd column called "lvl". If you are interested in, you can find it at http://www.net-one.de/~ks/WOoK/ by taking a look at "The PostrgreSQL side". Celko's original text is also there. Some stuff may be interesting for using PHP to edit PostgreSQL's tables. But that part is incomplete, yet. I'd be happy to get your thoughts to improve the handling (and my understanding) of "nested sets". Bye, Knut Sübert