postgresql 7.2 update cr_revisions set lob = [set __lob_id [db_string get_lob_id "select empty_lob()"]] where revision_id = :revision_id update cr_revisions set content_length = lob_length(lob) where revision_id = :revision_id select file_storage__new_version(:title,:description,:mime_type,:file_id,:creation_user,:creation_ip); update cr_revisions set content = '$tmp_filename', content_length = $tmp_size where revision_id = :revision_id