Index: openacs-4/packages/dotlrn/sql/postgresql/main-portlet-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/sql/postgresql/main-portlet-drop.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn/sql/postgresql/main-portlet-drop.sql	8 Aug 2006 21:26:22 -0000	1.3
+++ openacs-4/packages/dotlrn/sql/postgresql/main-portlet-drop.sql	1 Nov 2013 21:08:29 -0000	1.4
@@ -26,68 +26,74 @@
 -- License version 2 or higher.  Full text of the license is available
 -- from the GNU Project: http://www.fsf.org/copyleft/gpl.html
 
-create function inline_0 ()
-returns integer as '
-declare  
+
+
+--
+-- procedure inline_0/0
+--
+CREATE OR REPLACE FUNCTION inline_0(
+
+) RETURNS integer AS $$
+DECLARE  
   ds_id portal_datasources.datasource_id%TYPE;
-begin
+BEGIN
 
     perform acs_sc_binding__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet''
+        'portal_datasource',
+        'dotlrn_main_portlet'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''GetMyName''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'GetMyName'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''GetPrettyName''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'GetPrettyName'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''Link''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'Link'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''AddSelfToPage''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'AddSelfToPage'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''RemoveSelfFromPage''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'RemoveSelfFromPage'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''Show''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'Show'
     );
 
     perform acs_sc_impl_alias__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet'',
-        ''Edit''
+        'portal_datasource',
+        'dotlrn_main_portlet',
+        'Edit'
     );
 
     perform acs_sc_impl__delete(
-        ''portal_datasource'',
-        ''dotlrn_main_portlet''
+        'portal_datasource',
+        'dotlrn_main_portlet'
     );
 
     begin
     select datasource_id into ds_id
       from portal_datasources
-     where name = ''dotlrn-main-portlet'';
+     where name = 'dotlrn-main-portlet';
 -- cant seem to get the exception working properly.. 
 -- is it really necessary here?  look into it later.  -dan chak 2002-07-02
 --    exception when no_data_found then
@@ -100,9 +106,10 @@
   
   return 0;
 
-end;
-' language 'plpgsql';
+END;
 
+$$ LANGUAGE plpgsql;
+
 select inline_0();
 drop function inline_0();
 
