postgresql7.1 select r.content, i.storage_type from cr_revisions r, cr_items i where r.item_id = i.item_id and revision_id = $revision_id select item_id, mime_type, content_revision__is_live( revision_id ) as is_live from cr_revisions where revision_id = :revision_id