Index: openacs-4/packages/acs-subsite/www/admin/rel-segments/new-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/rel-segments/new-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/www/admin/rel-segments/new-postgresql.xql 9 Sep 2001 17:10:41 -0000 1.3 +++ openacs-4/packages/acs-subsite/www/admin/rel-segments/new-postgresql.xql 4 Dec 2001 00:20:47 -0000 1.4 @@ -8,10 +8,12 @@ select t2.pretty_name, t2.object_type as rel_type, repeat(' ', (tree_level(t2.tree_sortkey) - tree_level(t1.tree_sortkey)) * 4) as indent from acs_object_types t1, - acs_object_types t2 - where t2.tree_sortkey like (t1.tree_sortkey || '%') + acs_object_types t2, + rel_segments s + where t2.tree_sortkey between t1.tree_sortkey and tree_right(t1.tree_sortkey) and t1.object_type in ('membership_rel', 'composition_rel') - and t2.object_type not in (select s.rel_type from rel_segments s where s.group_id = :group_id) + and t2.object_type <> s.rel_type + and s.group_id = :group_id order by lower(t2.pretty_name) desc