postgresql7.1
select acs_object__name(:package_id)
select site_node__url(n.node_id) as url, acs_object__name(n.object_id) as name
from site_nodes n
where n.parent_id = :node_id
and n.object_id is not null
and acs_permission__permission_p(n.object_id, :user_id, 'read') = 't'
order by name