Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v diff -u -r1.38 -r1.39 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 1 Jul 2004 16:33:38 -0000 1.38 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql 12 Aug 2004 18:51:56 -0000 1.39 @@ -746,12 +746,16 @@ if v_storage_type = ''lob'' then v_new_lob := empty_lob(); + PERFORM lob_copy(v_lob, v_new_lob); + update cr_revisions set content = null, content_length = v_content_length, lob = v_new_lob where revision_id = v_revision_id_dest; - PERFORM lob_copy(v_lob, v_new_lob); + -- this call has to be before the above instruction, + -- because lob references the v_new_lob + -- PERFORM lob_copy(v_lob, v_new_lob); else -- this will work for both file and text types... well sort of. -- this really just creates a reference to the first file which is