Index: openacs-4/packages/dotlrn/sql/postgresql/dotlrn-admins-sanitize.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/Attic/dotlrn-admins-sanitize.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn/sql/postgresql/dotlrn-admins-sanitize.sql	29 Mar 2002 19:14:44 -0000	1.2
+++ openacs-4/packages/dotlrn/sql/postgresql/dotlrn-admins-sanitize.sql	2 Jul 2002 18:40:08 -0000	1.3
@@ -18,64 +18,74 @@
 -- Sanitize the dotLRN Admin package
 --
 -- @author <a href="mailto:yon@openforce.net">yon@openforce.net</a>
+-- @author dan chak (chak@openforce.net)
 -- @version $Id$
 --
 
+create function inline_0()
+returns integer as '
 declare
     foo                         integer;
 begin
 
     select min(segment_id)
     into foo
     from rel_segments
-    where segment_name = 'dotLRN Full Profiled Admins';
+    where segment_name = ''dotLRN Full Profiled Admins'';
 
-    rel_segment.delete(
-        segment_id => foo
+    perform rel_segment__delete(
+        foo
     );
 
-    acs_rel_type.drop_type(
-        rel_type => 'dotlrn_full_admin_profile_rel',
-        cascade_p => 't'
+    perform acs_rel_type__drop_type(
+        ''dotlrn_full_admin_profile_rel'',
+        ''t''
     );
 
+    return 0;
 end;
-/
-show errors
+' language 'plpgsql';
+select inline_0();
+drop function inline_0();
 
+create function inline_1() 
+returns integer as '
 declare
     foo                         integer;
 begin
 
     select min(segment_id)
     into foo
     from rel_segments
-    where segment_name = 'dotLRN Profiled Admins';
+    where segment_name = ''dotLRN Profiled Admins'';
 
-    rel_segment.delete(
-        segment_id => foo
+    perform rel_segment__delete(
+        foo
     );
 
     select min(group_id)
     into foo
     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
     where group_id = foo;
 
-    profiled_group.delete(
-        group_id => foo
+    perform profiled_group__delete(
+        foo
     );
 
-    acs_rel_type.drop_type(
-        rel_type => 'dotlrn_admin_profile_rel',
-        cascade_p => 't'
+    acs_rel_type__drop_type(
+        ''dotlrn_admin_profile_rel'',
+        ''t''
     );
 
+    return 0;
 end;
-/
-show errors
+' language 'plpgsql';
+
+select inline_1();
+drop function inline_1();
