Index: openacs-4/packages/categories/sql/postgresql/category-package.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/sql/postgresql/category-package.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/categories/sql/postgresql/category-package.sql 29 Sep 2003 04:21:53 -0000 1.2 +++ openacs-4/packages/categories/sql/postgresql/category-package.sql 10 Nov 2003 23:19:08 -0000 1.3 @@ -244,7 +244,7 @@ declare p_category_id alias for $1; p_tree_id alias for $2; - p_parent alias for $3; + p_parent_id alias for $3; v_old_left_ind integer; v_old_right_ind integer; 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.2 -r1.3 --- openacs-4/packages/categories/sql/postgresql/category-tree-package.sql 29 Sep 2003 04:21:53 -0000 1.2 +++ openacs-4/packages/categories/sql/postgresql/category-tree-package.sql 10 Nov 2003 23:19:08 -0000 1.3 @@ -229,7 +229,7 @@ and t.category_id = cs.category_id); -- for debugging reasons - perform check_nested_ind(p_dest_tree); + perform category_tree__check_nested_ind(p_dest_tree); return 0; end; @@ -323,14 +323,16 @@ select count(*) into v_parent from categories parent, categories child - where parent.tree_id = check_nested_ind.tree_id + where parent.tree_id = p_tree_id and child.tree_id = parent.tree_id and (parent.left_ind >= child.left_ind or parent.right_ind <= child.right_ind) and child.parent_id = parent.category_id; if v_parent > 0 then raise EXCEPTION ''-20003: child index must be between parent index!''; end if; + + return 0; end; ' language 'plpgsql';