postgresql7.1 update cr_revisions set content = '[set content_file [cr_create_content_file $item_id $revision_id $tmpfile]]' where revision_id = :revision_id update apm_package_versions set content_length = [cr_file_size $content_file] where version_id = :version_id select '[cr_fs_path]' || r.content as content, i.storage_type from cr_revisions r, cr_items i where r.item_id = i.item_id and r.revision_id = (select content_item__get_latest_revision(item_id) from apm_package_versions where version_id = :version_id)