Index: openacs-4/packages/categories/sql/postgresql/upgrade/upgrade-1.1.2d3-1.1.2d4.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/sql/postgresql/upgrade/upgrade-1.1.2d3-1.1.2d4.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/categories/sql/postgresql/upgrade/upgrade-1.1.2d3-1.1.2d4.sql 30 Jan 2009 02:59:51 -0000 1.2 +++ openacs-4/packages/categories/sql/postgresql/upgrade/upgrade-1.1.2d3-1.1.2d4.sql 1 Feb 2009 18:38:02 -0000 1.3 @@ -40,7 +40,7 @@ update categories set parent_id = (select t.category_id from categories s, categories t - where s.category_id = c.parent_id + where s.category_id = categories.parent_id and t.tree_id = p_dest_tree and s.left_ind + v_new_left_ind = t.left_ind) where tree_id = p_dest_tree;