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.44 -r1.45
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	6 Jul 2005 23:31:01 -0000	1.44
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	4 Jun 2006 00:45:23 -0000	1.45
@@ -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';
 
 
