pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Nested Sets WAS: column size too large, is this a bug?
3+ messages / 2 participants
[nested] [flat]

* Re: Nested Sets WAS: column size too large, is this a bug?
@ 2004-03-30 16:38  Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Josh Berkus @ 2004-03-30 16:38 UTC (permalink / raw)
  To: Robert Treat <xzilla@users.sourceforge.net>; Andrew Rawnsley <ronz@ravensfield.com>; +Cc: pgsql-performance

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?

-- 
Josh Berkus
Aglio Database Solutions
San Francisco



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Nested Sets WAS: column size too large, is this a bug?
@ 2004-03-30 20:06  Robert Treat <xzilla@users.sourceforge.net>
  parent: Josh Berkus <josh@agliodbs.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Robert Treat @ 2004-03-30 20:06 UTC (permalink / raw)
  To: Josh Berkus <josh@agliodbs.com>; Andrew Rawnsley <ronz@ravensfield.com>; +Cc: pgsql-performance

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.  

<digs a little>
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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Nested Sets WAS: column size too large, is this a bug?
@ 2004-03-30 20:13  Josh Berkus <josh@agliodbs.com>
  parent: Robert Treat <xzilla@users.sourceforge.net>
  0 siblings, 0 replies; 3+ messages in thread

From: Josh Berkus @ 2004-03-30 20:13 UTC (permalink / raw)
  To: Robert Treat <xzilla@users.sourceforge.net>; Andrew Rawnsley <ronz@ravensfield.com>; +Cc: pgsql-performance

Robert,

> 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 :-)

Hmmm ... I'd want to do a *lot* of testing before I trusted that approach.   
Seems like it could be very vunerable to order-of-exection issues.

I'll start a GUIDE on it, people can post their various Nested Sets solutions.

-- 
-Josh Berkus
 Aglio Database Solutions
 San Francisco




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-03-30 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-03-30 16:38 Re: Nested Sets WAS: column size too large, is this a bug? Josh Berkus <josh@agliodbs.com>
2004-03-30 20:06 ` Robert Treat <xzilla@users.sourceforge.net>
2004-03-30 20:13   ` Josh Berkus <josh@agliodbs.com>

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