Index: openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql	8 Dec 2001 01:17:59 -0000	1.9
+++ openacs-4/packages/acs-messaging/sql/postgresql/acs-messaging-packages.sql	9 Dec 2001 04:21:58 -0000	1.10
@@ -239,7 +239,7 @@
     v_message_id acs_messages.message_id%TYPE;
     v_ancestor_sk varbit;
 begin
-    select tree_root_key(tree_sortkey) into v_ancestor_sk
+    select tree_ancestor_key(tree_sortkey, 1) into v_ancestor_sk
       from acs_messages
      where message_id = p_message_id;
 
