Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id A2E82476461 for ; Fri, 22 Nov 2002 16:55:53 -0500 (EST) Received: from bast.unixathome.org (bast.unixathome.org [66.11.174.150]) by postgresql.org (Postfix) with ESMTP id 715BF475FC4 for ; Fri, 22 Nov 2002 16:55:51 -0500 (EST) Received: from wocker (wocker.unixathome.org [192.168.0.99]) by bast.unixathome.org (Postfix) with ESMTP id D5D923F4B; Fri, 22 Nov 2002 16:55:52 -0500 (EST) From: "Dan Langille" To: "Josh Berkus" Date: Fri, 22 Nov 2002 16:55:52 -0500 MIME-Version: 1.0 Subject: Re: Trees: maintaining pathnames Cc: pgsql-sql@postgresql.org Message-ID: <3DDE6198.26130.C4AB8AF0@localhost> In-reply-to: <3DDBA82F.15041.BA07175D@localhost> References: X-mailer: Pegasus Mail for Windows (v4.02a) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/349 X-Sequence-Number: 10491 On 20 Nov 2002 at 15:20, Dan Langille wrote: > On 17 Nov 2002 at 14:51, Josh Berkus wrote: > > > Dan, > > > > > My existing tree implementation reflects the files contained on > > > disk. > > > The > > > full pathname to a particlar file is obtained from the path to the > > > parent directory. I am now considering putting this information > > > into a field in the table. > > > > > Suggestions, comment, open ridicule, most welcome. thanks. > > > > This is a fine implementation using the adjacency list model of tree > > design. However, I think you may find that the string-based tree > > implementation in /contrib/ltree is more suited to your purposes, > > and easier to maintain. > > That looks interesting. I have installed that onto a test server and > I'm playing around with it. FWIW, the ltree seems to implement a tree through text manipulation. I already have a tree (using a sinble table with id, parent_id). Therefore, I think ltree is not an option in this situation. My creation of the pathname was to save processing time. I'll talk more about that in my next post. -- Dan Langille : http://www.langille.org/