postgresql7.1 select parent_id, content_folder__is_folder(item_id) as folder_p from cr_items where item_id = :resolved_id