postgresql7.1
select 1
select
content
from
cr_revisions
where
revision_id = :revision_id
select case when i.storage_type = 'file'
then '[cr_fs_path]' || r.content
when i.storage_type = 'lob'
then lob::text
else r.content end as content, i.storage_type
from cr_revisions r, cr_items i
where r.item_id = i.item_id and r.revision_id = :revision_id
select
content
from
cr_revisions
where
revision_id = :revision_id