postgresql7.1
select acs_object_id_seq.nextval
select content_revision__new (
:new_title, -- title =>
:new_desc, -- description
current_timestamp, -- publish_date
null, -- mime_type
null, -- nls_language
null, -- locale
:photo_id, -- item_id
:revision_id, -- revision_id
current_timestamp, -- creation_date
:user_id, -- creation_user
:peeraddr -- creation_ip
)
update pa_photos
set user_filename = (select user_filename
from pa_photos
where pa_photo_id = :previous_revision)
where pa_photo_id = :revision_id
select content_item__set_live_revision (:revision_id)