Skip site navigation (1) Skip section navigation (2)

Re: Trees: maintaining pathnames

From: "Dan Langille" <dan(at)langille(dot)org>
To: "Josh Berkus" <josh(at)agliodbs(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Trees: maintaining pathnames
Date: 2002-11-22 21:55:52
Message-ID: 3DDE6198.26130.C4AB8AF0@localhost (view raw or flat)
Thread:
Lists: pgsql-sql
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.
> > <snip>
> > > 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/


In response to

pgsql-sql by date

Next:From: Dan LangilleDate: 2002-11-22 22:17:05
Subject: Re: Trees: maintaining pathnames
Previous:From: mark carewDate: 2002-11-22 21:52:57
Subject: Re: escape single quote in INSERT command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group