Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql	23 Mar 2010 21:53:49 -0000	1.4
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-drop.sql	7 Jul 2011 10:46:02 -0000	1.5
@@ -30,34 +30,35 @@
 drop table apm_packages;
 drop table apm_package_types;
 
-create function inline_0 () returns integer as '
-begin
+CREATE OR REPLACE FUNCTION inline_0 () RETURNS integer AS $$
+BEGIN
     PERFORM acs_object_type__drop_type (
-      ''apm_package'', ''f''
+      'apm_package', 'f'
     );
 
     PERFORM acs_object_type__drop_type (
-      ''apm_application'', ''f''
+      'apm_application', 'f'
     );
 
     PERFORM acs_object_type__drop_type (
-      ''apm_service'', ''f''
+      'apm_service', 'f'
     );
 
     PERFORM acs_object_type__drop_type (
-      ''apm_package_version'', ''f''
+      'apm_package_version', 'f'
     );
 
     PERFORM acs_object_type__drop_type (
-      ''apm_parameter_value'', ''f''
+      'apm_parameter_value', 'f'
     );
 
     PERFORM acs_object_type__drop_type (
-      ''apm_parameter'', ''f''
+      'apm_parameter', 'f'
     );
 
     return null;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 select inline_0 ();
 
