Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql,v
diff -u -r1.24 -r1.25
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql	19 Sep 2002 02:02:08 -0000	1.24
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-type.sql	6 Jan 2003 17:07:49 -0000	1.25
@@ -174,7 +174,16 @@
     -- The rule dropping might be redundant as the rule might be dropped
     -- when the view is dropped.
 
-    execute ''drop rule '' || v_table_name || ''_r'';
+    -- different syntax for dropping a rule in 7.2 and 7.3 so check which
+    -- version is being used (olah).
+
+    if version() like ''%7.2%'' then
+      execute ''drop rule '' || v_table_name || ''_r'';
+    else
+      -- 7.3 syntax
+      execute ''drop rule '' || v_table_name || ''_r '' || ''on '' || v_table_name || ''i'';
+    end if;
+
     execute ''drop view '' || v_table_name || ''x'';
     execute ''drop view '' || v_table_name || ''i'';
 
@@ -589,7 +598,16 @@
 
   -- drop the old rule
   if rule_exists(v_table_name || ''_r'', v_table_name || ''i'') then 
-     execute ''drop rule '' || v_table_name || ''_r'';
+
+    -- different syntax for dropping a rule in 7.2 and 7.3 so check which
+    -- version is being used (olah).
+    if version() like ''%7.2%'' then
+      execute ''drop rule '' || v_table_name || ''_r'';
+    else
+      -- 7.3 syntax
+      execute ''drop rule '' || v_table_name || ''_r '' || ''on '' || v_table_name || ''i'';
+    end if;
+
   end if;
 
   -- create the new rule for inserts on the content type
