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.43 -r1.43.2.1
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	20 Mar 2005 15:58:45 -0000	1.43
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	5 Jun 2005 16:38:14 -0000	1.43.2.1
@@ -331,12 +331,13 @@
     cols := cols || '', '' || attr_rec.attribute_name;
   end loop;
 
-  execute ''insert into '' || v_table_name || '' select '' || copy_attributes__copy_id || 
+    execute ''insert into '' || v_table_name || ''('' || v_id_column || cols || '')'' || '' select '' || copy_attributes__copy_id || 
           '' as '' || v_id_column || cols || '' from '' || 
           v_table_name || '' where '' || v_id_column || '' = '' || 
           copy_attributes__revision_id;
-  
+
   return 0; 
+
 end;' language 'plpgsql';
 
 
