Index: openacs-4/packages/dotlrn/sql/postgresql/admins-sanitize.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/admins-sanitize.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/sql/postgresql/admins-sanitize.sql	8 Aug 2006 21:26:22 -0000	1.3
+++ openacs-4/packages/dotlrn/sql/postgresql/admins-sanitize.sql	1 Nov 2013 21:08:28 -0000	1.4
@@ -22,42 +22,55 @@
 -- @version $Id$
 --
 
-create function inline_0()
-returns integer as '
-declare
+
+
+--
+-- procedure inline_0/0
+--
+CREATE OR REPLACE FUNCTION inline_0(
+
+) RETURNS integer AS $$
+DECLARE
     foo                         integer;
-begin
+BEGIN
 
     select min(segment_id)
     into foo
     from rel_segments
-    where segment_name = ''dotLRN Full Profiled Admins'';
+    where segment_name = 'dotLRN Full Profiled Admins';
 
     perform rel_segment__delete(
         foo
     );
 
     perform acs_rel_type__drop_type(
-        ''dotlrn_full_admin_profile_rel'',
-        ''t''
+        'dotlrn_full_admin_profile_rel',
+        't'
     );
 
     return 0;
-end;
-' language 'plpgsql';
+END;
+
+$$ LANGUAGE plpgsql;
 select inline_0();
 drop function inline_0();
 
-create function inline_1() 
-returns integer as '
-declare
+
+
+--
+-- procedure inline_1/0
+--
+CREATE OR REPLACE FUNCTION inline_1(
+
+) RETURNS integer AS $$
+DECLARE
     foo                         integer;
-begin
+BEGIN
 
     select min(segment_id)
     into foo
     from rel_segments
-    where segment_name = ''dotLRN Profiled Admins'';
+    where segment_name = 'dotLRN Profiled Admins';
 
     perform rel_segment__delete(
         foo
@@ -68,7 +81,7 @@
     from profiled_groups
     where profile_provider = (select min(impl_id)
                               from acs_sc_impls
-                              where impl_name = ''dotlrn_admin_profile_provider'');
+                              where impl_name = 'dotlrn_admin_profile_provider');
 
     delete
     from dotlrn_user_types
@@ -79,13 +92,14 @@
     );
 
     perform acs_rel_type__drop_type(
-        ''dotlrn_admin_profile_rel'',
-        ''t''
+        'dotlrn_admin_profile_rel',
+        't'
     );
 
     return 0;
-end;
-' language 'plpgsql';
+END;
 
+$$ LANGUAGE plpgsql;
+
 select inline_1();
 drop function inline_1();
