Re: Joe Celko Function - Mailing list pgsql-general

From Fran Fabrizio
Subject Re: Joe Celko Function
Date
Msg-id 3CCFEF56.5000606@mmrd.com
Whole thread Raw
In response to Joe Celko Function  ("Ben-Nes Michael" <miki@canaan.co.il>)
Responses Re: Joe Celko Function
List pgsql-general
To drop branches, I typically loop through this function.  But it would be easy to extend this case to drop an entire
branchat  
once.  You just need to know what the offset is.  If you are dropping a whole brach, it's actually an easier case,
becauseyou  
don't have to worry about shifting lower nodes on the branch (nodes that appear between the lft and rgt of the node you
dropped). 
  So if the lft is 50 and the rgt is 60, everyone else's numbers would just shift down 11. (The former lft 61 should
becomelft  
50, etc...).

-Fran



pgsql-general by date:

Previous
From: "Ben-Nes Michael"
Date:
Subject: Re: Joe Celko Function
Next
From: Andrew Sullivan
Date:
Subject: Re: Failed compile on Sun