Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql,v
diff -u -r1.33 -r1.34
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql	8 Dec 2001 01:17:59 -0000	1.33
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-create.sql	9 Dec 2001 04:21:58 -0000	1.34
@@ -236,6 +236,13 @@
   foreign key (item_id) references cr_items(item_id);
 
 
+create function cr_items_get_tree_sortkey(integer) returns varbit as '
+declare
+  p_item_id    alias for $1;
+begin
+  return tree_sortkey from cr_items where item_id = p_item_id;
+end;' language 'plpgsql';
+
 create function cr_items_tree_insert_tr () returns opaque as '
 declare
         v_parent_sk     varbit default null;
@@ -955,6 +962,13 @@
 );
 
 
+create function cr_keywords_get_tree_sortkey(integer) returns varbit as '
+declare
+  p_keyword_id    alias for $1;
+begin
+  return tree_sortkey from cr_keywords where keyword_id = p_keyword_id;
+end;' language 'plpgsql';
+
 create function cr_keywords_tree_insert_tr () returns opaque as '
 declare
         v_parent_sk      varbit default null;
