Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql 28 Aug 2003 09:41:43 -0000 1.17 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs-postgresql.xql 27 Nov 2003 15:25:18 -0000 1.18 @@ -9,48 +9,43 @@ - + - select site_node__url(site_nodes.node_id) as url, - site_nodes.node_id, - site_nodes.parent_id, - site_nodes.name, - site_nodes.directory_p, - site_nodes.pattern_p, - site_nodes.object_id, - (select acs_objects.object_type - from acs_objects - where acs_objects.object_id = site_nodes.object_id) as object_type, - apm_packages.package_key, - apm_packages.package_id, - apm_packages.instance_name, - apm_package_types.package_type - from site_nodes left join - apm_packages on site_nodes.object_id = apm_packages.package_id left join - apm_package_types using (package_key) + select n.node_id, + n.parent_id, + n.name, + n.directory_p, + n.pattern_p, + n.object_id, + p.package_key, + p.package_id, + p.instance_name, + t.package_type + from site_nodes n left join + apm_packages p on n.object_id = p.package_id left join + apm_package_types t using (package_key) + where n.tree_sortkey between site_node_get_tree_sortkey(:node_id) + and tree_right(site_node_get_tree_sortkey(:node_id)) + order by n.tree_sortkey - select site_node__url(site_nodes.node_id) as url, - site_nodes.node_id, - site_nodes.parent_id, - site_nodes.name, - site_nodes.directory_p, - site_nodes.pattern_p, - site_nodes.object_id, - (select acs_objects.object_type - from acs_objects - where acs_objects.object_id = site_nodes.object_id) as object_type, - apm_packages.package_key, - apm_packages.package_id, - apm_packages.instance_name, - apm_package_types.package_type - from site_nodes left join - apm_packages on site_nodes.object_id = apm_packages.package_id left join - apm_package_types using (package_key) - where site_nodes.node_id = :node_id + select n.node_id, + n.parent_id, + n.name, + n.directory_p, + n.pattern_p, + n.object_id, + p.package_key, + p.package_id, + p.instance_name, + t.package_type + from site_nodes n left join + apm_packages p on n.object_id = p.package_id left join + apm_package_types t using (package_key) + where n.node_id = :node_id