postgresql7.1
select content_revision__delete(:revision_id)
select item_id
from cr_items
where parent_id = etp__get_folder_id(:package_id)
and name = :name
select count(1) as revision_count
from cr_revisions r, cr_items i
where r.item_id = i.item_id
and i.parent_id = etp__get_folder_id(:package_id)
and i.name = :name
and r.revision_id > :revision_id