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

Re: Tree structure table normalization problem (do I need atrigger?)

From: Frank Joerdens <frank(at)joerdens(dot)de>
To: Tulassay Zsolt <zsolt(at)tek(dot)bke(dot)hu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Tree structure table normalization problem (do I need atrigger?)
Date: 2000-12-19 13:17:58
Message-ID: 3A3F6006.ECDE92AE@joerdens.de (view raw or flat)
Thread:
Lists: pgsql-sql
Tulassay Zsolt wrote:
[ . . . ]
> The SQL stuff of that nested set structure is fairly easy, I wrote some
> quick'n'dirty plpgsql functions that will do inserts, updates, deletes
> from the tree, display level number etc.

What scared me about it in particular was one scenario where you try to delete a subtree.
This would normally leave a gap, since the structure is based on the worm's ability to get
from one node to the next with an increment of just 1. Once you had a subtree deleted,
you'd either would have to have the worm leap-frog (a leaping frog-worm?!! :)) the gap or
update an entire half of the tree to close it . . . then my brain started to hurt and I
gave up.

> I can send it to you if you like (please allow a few days since I
> have several exams at the university this week).

Sure, I'd like to have a look at it!

Thanks, Frank

In response to

Responses

pgsql-sql by date

Next:From: Frank JoerdensDate: 2000-12-19 13:51:16
Subject: Re: Tree structure table normalization problem (do I need atrigger?)
Previous:From: Brett W. McCoyDate: 2000-12-19 13:08:09
Subject: Re: replace??

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