pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: miguel sofer <mig@utdt.edu>
To: Alvar Freude <alvar.freude@merz-akademie.de>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to represent a tree-structure in a relationaldatabase
Date: Fri, 15 Dec 2000 12:13:08 GMT
Message-ID: <20001215.12130800@ant.utdt> (raw)
In-Reply-To: <3A398526.3C491E91@merz-akademie.de>
References: <3A379A5F.97FFAF01@joerdens.de>
	<20001213.19440200@ant.utdt>
	<3A398526.3C491E91@merz-akademie.de>


> > I once started writing a small paper on this subject; it is still in a
> > rather preliminary state.
> >
> > You can download the draft (and some ill documented code, 53kB) from
> >   http://www.utdt.edu/~mig/sql-trees

> ah, this looks very, very nice!

Thanks.

> on page 5ff you describe the Postgres implementation, but the URL (page
> 5 bottom) is't complete -- can i find the files somewhere?
> Included is a "tree_general.sql", but this seems not to be complete and
> not the same version as the ps-file (First draft, may 6, 2000): in the
> draft there is written about an base 160 encoding, tree_general.sql uses
> base 159 encoding ;)

Sorry, I never got around to completing this, or thinking any further. My 
other files are definitely not in a usable state right now. I hope to be 
able 
to improve things over the (southern) summer holidays, so there may be 
news 
soon - but do not hold your breadth!

I can't remember why I switched from base 160 to base 159; my guess now 
is that 
I got confused at coding time between the base and the maximal number 
(base-1): 
ie, it may be a mistake.

> What's against using all characters >= 32, excluding special characters
> with special meaning in LIKE and regexps? With base 208 encoding it's
> possible to have 43264 elements on each level.

Nothing, I guess. I probably got some kind of "start counting at zero" 
blockage when I started, and never really looked back on it, my shame. 
Hey, I told you it was rather preliminary ... Thanks for pointing it out.

> i guess, with base 160 encoding there might be a problem: if postgres is
> compiled with --enable-locale (e.g. for german umlauts), the ordering
> isn't according to the ASCII number of the character, so for this
> purpose it's needed to build the encoding table according to the locate
> settings. Or simply sort it according the locale settings.

Yes indeed; never thought about that one.

Cheers

Miguel








view thread (27+ messages)  latest in thread

Message-ID: <20001215.12130800@ant.utdt>
Permalink:  ../20001215.12130800@ant.utdt/
Also on:    postgresql.org/message-id/20001215.12130800@ant.utdt

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mig@utdt.edu, alvar.freude@merz-akademie.de
  Subject: Re: How to represent a tree-structure in a relationaldatabase
  In-Reply-To: <20001215.12130800@ant.utdt>
  References: <3A379A5F.97FFAF01@joerdens.de> <20001213.19440200@ant.utdt> <3A398526.3C491E91@merz-akademie.de> <20001215.12130800@ant.utdt>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox