postgresql7.1
select site_node__url(n.node_id) as url, n.node_id, n.directory_p,
n.pattern_p, n.object_id, o.object_type, n.package_key, n.package_id
from acs_objects o,
(select n.node_id, n.directory_p, n.pattern_p, n.object_id,
p.package_key, p.package_id
from site_nodes n, apm_packages p
where n.object_id = p.package_id) n
where n.object_id = o.object_id
select site_node__new (
:new_node_id,
:parent_id,
:name,
NULL,
:directory_p,
:pattern_p,
:user_id,
:ip_address
)
select site_node__new (
null,
:parent_node_id,
:instance_name,
null,
't',
't',
null,
null
);
select site_node__url(node_id) from site_nodes where object_id=:subsite_pkg_id
select site_node__delete(:node_id);