X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 377C1D1E8A5 for ; Tue, 30 Mar 2004 20:06:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 65568-06 for ; Tue, 30 Mar 2004 16:06:12 -0400 (AST) Received: from lakemtao03.cox.net (lakemtao03.cox.net [68.1.17.242]) by svr1.postgresql.org (Postfix) with ESMTP id 6D195D1E7EE for ; Tue, 30 Mar 2004 16:06:10 -0400 (AST) Received: from [192.168.0.13] ([68.105.165.18]) by lakemtao03.cox.net (InterMail vM.5.01.06.08 201-253-122-130-108-20031117) with ESMTP id <20040330200612.YKO27519.lakemtao03.cox.net@[192.168.0.13]>; Tue, 30 Mar 2004 15:06:12 -0500 From: Robert Treat To: Josh Berkus , Andrew Rawnsley Subject: Re: Nested Sets WAS: column size too large, is this a bug? Date: Tue, 30 Mar 2004 15:06:08 -0500 User-Agent: KMail/1.5 Cc: pgsql-performance@postgresql.org References: <082D0538-7E86-11D8-8B9C-000A95AB8896@quotefx.net> <200403300920.27739.xzilla@users.sourceforge.net> <200403300838.50538.josh@agliodbs.com> In-Reply-To: <200403300838.50538.josh@agliodbs.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403301506.08882.xzilla@users.sourceforge.net> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200403/426 X-Sequence-Number: 6282 On Tuesday 30 March 2004 11:38, Josh Berkus wrote: > Robert, > > > If you search the pgsql-sql archives you'll find some helpful threads on > > using nested sets in PostgreSQL, one in particular I was involved with > > was a generic "move_tree" function that enabled moving a node from one > > branch to another. > > I have to admit to failing to follow -SQL over the last few months. This > list and Hackers are pretty much the only ones I read all of. > > Maybe I should get back on -SQL and we can compare move_tree functions :-) > > Did yours use a temp table, or some other means? Nope, Greg Mullane and I worked out the math and came up with an algorithm of sorts that we could apply to the tree when moving elements. http://archives.postgresql.org/pgsql-sql/2002-11/msg00355.php Seemed to work though someone else had posted yet another version after ours... and in fact the one posted is not exactly what I use now either :-) Robert Treat -- Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL