Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 5C6664763D4 for ; Fri, 24 May 2002 15:46:06 -0400 (EDT) Received: from h00a024ee7419.ne.client2.attbi.com (h00a024ee7419.ne.client2.attbi.com [24.218.2.105]) by postgresql.org (Postfix) with ESMTP id DD8F647660C for ; Fri, 24 May 2002 15:28:09 -0400 (EDT) Received: (from yrp001@localhost) by h00a024ee7419.ne.client2.attbi.com (8.11.1/8.11.1) id g4OJS7H04139; Fri, 24 May 2002 15:28:07 -0400 Date: Fri, 24 May 2002 15:28:07 -0400 From: Ron Peterson To: Gregory Brauer Cc: pgsql-sql@postgresql.org Subject: Re: Trees in SQL Message-ID: <20020524152806.A4111@yellowbank.com> References: <3CEE818B.9020702@wildbrain.com> <3CEE87C1.3050501@wildbrain.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3CEE87C1.3050501@wildbrain.com>; from greg@wildbrain.com on Fri, May 24, 2002 at 11:34:41AM -0700 Organization: Yellowbank X-Operating-System: GNU/Linux X-Archive-Number: 200205/269 X-Sequence-Number: 7904 On Fri, May 24, 2002 at 11:34:41AM -0700, Gregory Brauer wrote: > > I guess this page answers many of my questions... > > http://www.intelligententerprise.com/001020/celko1_1.shtml > > Anybody have comments on working with nested sets? Note that Joe Celko concludes this article by saying "Although this procedure works, you might want to use a language that has arrays in it, instead of trying to stick to pure SQL." The operations required to maintain this type of structure are expensive. You might like to take a look at: http://cddb.sai.msu.su/~megera/postgres/gist/ I haven't had a chance to try this out yet, but it looks promising. As an added bonus, if you're Russian, the documentation is in Russian. Unfortunately, if you're not Russian, the documentation is in Russian. Otherwise, for the time being, I'd recomend procedural code, rather than pure SQL. -- Ron Peterson -o) 87 Taylor Street /\\ Granby, MA 01033 _\_v https://www.yellowbank.com/ ----