Index: openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql	15 Aug 2002 18:23:42 -0000	1.6
+++ openacs-4/packages/dotlrn-dotlrn/sql/postgresql/dotlrn-dotlrn-create.sql	27 Oct 2014 16:41:18 -0000	1.7
@@ -25,146 +25,153 @@
 -- ported to pg by dan chak (chak@openforce.net)
 -- 2002-07-08
 
-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
 	-- create the implementation
 	foo := acs_sc_impl__new (
-		''dotlrn_applet'',
-		''dotlrn_dotlrn'',
-		''dotlrn_dotlrn''
+		'dotlrn_applet',
+		'dotlrn_dotlrn',
+		'dotlrn_dotlrn'
 	);
 
 	-- add all the hooks
 
 	-- GetPrettyName
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''GetPrettyName'',
-	       ''dotlrn_dotlrn::get_pretty_name'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'GetPrettyName',
+	       'dotlrn_dotlrn::get_pretty_name',
+	       'TCL'
 	);
 
 	-- AddApplet
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''AddApplet'',
-	       ''dotlrn_dotlrn::add_applet'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'AddApplet',
+	       'dotlrn_dotlrn::add_applet',
+	       'TCL'
 	);
 
 	-- RemoveApplet
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''RemoveApplet'',
-	       ''dotlrn_dotlrn::remove_applet'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'RemoveApplet',
+	       'dotlrn_dotlrn::remove_applet',
+	       'TCL'
 	);
 
 	-- AddAppletToCommunity
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''AddAppletToCommunity'',
-	       ''dotlrn_dotlrn::add_applet_to_community'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'AddAppletToCommunity',
+	       'dotlrn_dotlrn::add_applet_to_community',
+	       'TCL'
 	);
 
 	-- RemoveAppletFromCommunity
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''RemoveAppletFromCommunity'',
-	       ''dotlrn_dotlrn::remove_applet_from_community'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'RemoveAppletFromCommunity',
+	       'dotlrn_dotlrn::remove_applet_from_community',
+	       'TCL'
 	);
 
 
 	-- AddUser
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''AddUser'',
-	       ''dotlrn_dotlrn::add_user'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'AddUser',
+	       'dotlrn_dotlrn::add_user',
+	       'TCL'
 	);
 
 	-- RemoveUser
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''RemoveUser'',
-	       ''dotlrn_dotlrn::remove_user'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'RemoveUser',
+	       'dotlrn_dotlrn::remove_user',
+	       'TCL'
 	);
 
 	-- AddUserToCommunity
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''AddUserToCommunity'',
-	       ''dotlrn_dotlrn::add_user_to_community'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'AddUserToCommunity',
+	       'dotlrn_dotlrn::add_user_to_community',
+	       'TCL'
 	);
 
 	-- RemoveUserFromCommunity
 	foo := acs_sc_impl_alias__new (
-	       ''dotlrn_applet'',
-	       ''dotlrn_dotlrn'',
-	       ''RemoveUserFromCommunity'',
-	       ''dotlrn_dotlrn::remove_user_from_community'',
-	       ''TCL''
+	       'dotlrn_applet',
+	       'dotlrn_dotlrn',
+	       'RemoveUserFromCommunity',
+	       'dotlrn_dotlrn::remove_user_from_community',
+	       'TCL'
 	);
 
     -- AddPortlet
     foo := acs_sc_impl_alias__new (
-        ''dotlrn_applet'',
-        ''dotlrn_dotlrn'',
-        ''AddPortlet'',
-        ''dotlrn_dotlrn::add_portlet'',
-        ''TCL''
+        'dotlrn_applet',
+        'dotlrn_dotlrn',
+        'AddPortlet',
+        'dotlrn_dotlrn::add_portlet',
+        'TCL'
     );
 
     -- RemovePortlet
     foo := acs_sc_impl_alias__new (
-        ''dotlrn_applet'',
-        ''dotlrn_dotlrn'',
-        ''RemovePortlet'',
-        ''dotlrn_dotlrn::remove_portlet'',
-        ''TCL''
+        'dotlrn_applet',
+        'dotlrn_dotlrn',
+        'RemovePortlet',
+        'dotlrn_dotlrn::remove_portlet',
+        'TCL'
     );
 
     -- Clone
     foo := acs_sc_impl_alias__new (
-        ''dotlrn_applet'',
-        ''dotlrn_dotlrn'',
-        ''Clone'',
-        ''dotlrn_dotlrn::clone'',
-        ''TCL''
+        'dotlrn_applet',
+        'dotlrn_dotlrn',
+        'Clone',
+        'dotlrn_dotlrn::clone',
+        'TCL'
     );
 
     foo := acs_sc_impl_alias__new (
-        ''dotlrn_applet'',
-        ''dotlrn_dotlrn'',
-        ''ChangeEventHandler'',
-        ''dotlrn_dotlrn::change_event_handler'',
-        ''TCL''
+        'dotlrn_applet',
+        'dotlrn_dotlrn',
+        'ChangeEventHandler',
+        'dotlrn_dotlrn::change_event_handler',
+        'TCL'
     );
 
 	-- Add the binding
 	perform acs_sc_binding__new (
-	    ''dotlrn_applet'',
-	    ''dotlrn_dotlrn''
+	    'dotlrn_applet',
+	    'dotlrn_dotlrn'
 	);
 
 	return 0;
 
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
 
 select inline_0();
 drop function inline_0();
