Index: openacs-4/packages/categories/sql/postgresql/category-tree-package.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/sql/postgresql/category-tree-package.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/categories/sql/postgresql/category-tree-package.sql	8 Feb 2004 17:29:03 -0000	1.5
+++ openacs-4/packages/categories/sql/postgresql/category-tree-package.sql	11 Feb 2004 10:54:32 -0000	1.6
@@ -341,67 +341,3 @@
         return 0;
 end;
 ' language 'plpgsql';
-
-create or replace function category_tree__refresh_nested_ind (
-    integer   -- tree_id
-)
-returns integer as '
-declare
-    p_tree_id           alias for $1;
-    v_left_ind          integer;
-    v_right_ind         integer;
-begin
-	v_left_ind := 1;
-	for top_nodes in (select category_id
-			  from categories
-			  where tree_id = p_tree_id
-			  and parent_id is null) loop
-		v_right_ind := index_children(top_nodes.category_id, v_left_ind);
-
-		update categories
-		set left_ind = v_left_ind,
-		right_ind = v_right_ind + 1
-		where category_id = top_nodes.category_id;
-
-		v_left_ind := v_right_ind + 2;
-	end loop;
-end;
-' language 'plpgsql';
-
--- create or replace function category_tree__index_children (
---     integer,   -- tree_id
---     integer    -- ind
--- )
--- returns integer as '
--- declare
--- 	TYPE type_categories IS TABLE OF integer;
--- 	nodes type_categories := type_categories();
--- 	TYPE type_cursor IS REF CURSOR ;
--- 	cc type_cursor;
--- 	i integer := 0;
--- 	v_category_id integer;
--- 	v_ind integer := ind;
--- 	v_left_ind integer;
--- begin
--- 	open cc for 'select category_id from categories where parent_id = :p_parent_id ' using p_parent_id;
--- 	loop	    
--- 	    fetch cc into v_category_id;
--- 	    exit when cc%NOTFOUND;
--- 	    i := i + 1; 
--- 	    nodes.extend;
--- 	    nodes(i) := v_category_id;
--- 	end loop;
--- 	close cc;
--- 	if i > 0 then
--- 	   for j in 1..i loop
--- 	        v_ind := v_ind + 1;
--- 	        v_left_ind := v_ind;
--- 	        v_ind:= index_children(nodes(j), v_ind);
--- 	        v_ind := v_ind + 1;
--- 		update categories set left_ind = v_left_ind, right_ind = v_ind where category_id = nodes(j);
--- 	   end loop;
--- 	end if;
--- 	return v_ind;
--- end;
--- ' language 'plpgsql';
-
