pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kulikov <a.kulikov@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Re: Nested Sets
Date: Sat, 16 Apr 2005 18:28:27 +0400
Message-ID: <fc63e1af05041607286c0447e8@mail.gmail.com> (raw)
In-Reply-To: <pan.2005.04.16.13.04.47.372088@arvin.dk>
References: <fc63e1af0504160531795a314d@mail.gmail.com>
	<pan.2005.04.16.13.04.47.372088@arvin.dk>

Seen this before. The solution is rather lame, as most of the logic is
shifted out to the code, whereas it could have been implemented in the
database directly. I have managed to get a move_tree algorythm working
rather fast and glitch free by now, yet I am wondering if there are
other directions to follow. What I can see as actual are:

 * deleting trees
 * swapping nodes places on one level (including the subtrees)

btw, do stored procedures (user functions in other words) have to
implement table locking or be carried out inside a transaction such
that the nested set indexes remain intact?

regards,

alex

2005/4/16, Troels Arvin <troels@arvin.dk>:
> On Sat, 16 Apr 2005 16:31:43 +0400, A. Kulikov wrote:
> 
> > Has anyone implemented a pretty Nested Sets solution in
> > PostgreSQL?
> 
> Maybe this is useful? :
> http://threebit.net/tutorials/nestedset/tutorial1.html
> 
> --
> Greetings from Troels Arvin, Copenhagen, Denmark
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
> 
>                http://www.postgresql.org/docs/faq
> 


-- 
The mind is essential -- http://essentialmind.com/



view thread (6+ messages)  latest in thread

Message-ID: <fc63e1af05041607286c0447e8@mail.gmail.com>
Permalink:  ../fc63e1af05041607286c0447e8@mail.gmail.com/
Also on:    postgresql.org/message-id/fc63e1af05041607286c0447e8@mail.gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: a.kulikov@gmail.com
  Subject: Re: Nested Sets
  In-Reply-To: <fc63e1af05041607286c0447e8@mail.gmail.com>

* 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