postgresql7.1 select count(*) from cr_items where name = :title and parent_id = content_item__get_parent_folder(:file_id)