Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql,v
diff -u -r1.27 -r1.28
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql	28 Aug 2001 01:07:23 -0000	1.27
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-item.sql	30 Aug 2001 01:46:05 -0000	1.28
@@ -1043,14 +1043,16 @@
        pos              integer,
        name             text,
        parent_id        integer,
-       tree_level       integer
+       tree_level       integer,
+       primary key (sid,pos)
 );
 
 create table get_path_rel_cursor (
        sid              integer,
        pos              integer,
        parent_id        integer,
-       tree_level       integer
+       tree_level       integer,
+       primary key (sid,pos)
 );
 
 create function content_item__create_rel_cursor(integer,integer) 
@@ -1376,8 +1378,8 @@
  -- register template if it is not already registered
   insert into cr_item_template_map
   select
-    register_template__template_id as template_id,
     register_template__item_id as item_id,
+    register_template__template_id as template_id,
     register_template__use_context as use_context
   from
     dual
