Index: openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a4-5.1.0a5.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a4-5.1.0a5.sql,v
diff -u -N -r1.2 -r1.3
--- openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a4-5.1.0a5.sql	24 Jul 2004 08:34:20 -0000	1.2
+++ openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a4-5.1.0a5.sql	30 Mar 2013 22:50:45 -0000	1.3
@@ -1,42 +1,46 @@
-create function inline_0() returns integer as '
-declare
+--
+-- procedure inline_0/0
+--
+CREATE OR REPLACE FUNCTION inline_0(
+) RETURNS integer AS $$
+DECLARE
         impl_id integer;
         v_foo   integer;
-begin
+BEGIN
         -- the notification type impl
         impl_id := acs_sc_impl__new (
-                      ''NotificationType'',
-                      ''fs_fs_notif_type'',
-                      ''file_storage''
+                      'NotificationType',
+                      'fs_fs_notif_type',
+                      'file_storage'
                    );
 	
 	v_foo := acs_sc_impl_alias__new (
-                    ''NotificationType'',			-- impl_contract_name
-                    ''fs_fs_notif_type'',			-- impl_name
-                    ''GetURL'',					-- impl_operation_name
-		    ''fs::notification::get_url'',					-- impl_alias
-                    ''TCL''					-- impl_pl
+                    'NotificationType',			-- impl_contract_name
+                    'fs_fs_notif_type',			-- impl_name
+                    'GetURL',					-- impl_operation_name
+		    'fs::notification::get_url',					-- impl_alias
+                    'TCL'					-- impl_pl
                  );
 
 	v_foo := acs_sc_impl_alias__new (
-                    ''NotificationType'',
-                    ''fs_fs_notif_type'',
-                    ''ProcessReply'',
-                    '' fs::notification::process_reply'',
-                    ''TCL''
+                    'NotificationType',
+                    'fs_fs_notif_type',
+                    'ProcessReply',
+                    ' fs::notification::process_reply',
+                    'TCL'
         );	
 
         PERFORM acs_sc_binding__new (
-                    ''NotificationType'',
-                    ''fs_fs_notif_type''
+                    'NotificationType',
+                    'fs_fs_notif_type'
                  );
 
         v_foo:= notification_type__new (
 		NULL,
 		impl_id,
-		''fs_fs_notif'',
-      	        ''File-Storage Notification'',
-                ''Notifications for File Storage'',
+		'fs_fs_notif',
+      	        'File-Storage Notification',
+                'Notifications for File Storage',
 		now(),
                 NULL,
                 NULL,
@@ -47,17 +51,18 @@
         insert into notification_types_intervals
         (type_id, interval_id)
         select v_foo, interval_id
-        from notification_intervals where name in (''instant'',''hourly'',''daily'');
+        from notification_intervals where name in ('instant','hourly','daily');
 
         insert into notification_types_del_methods
         (type_id, delivery_method_id)
         select v_foo, delivery_method_id
-        from notification_delivery_methods where short_name in (''email'');
+        from notification_delivery_methods where short_name in ('email');
 	
 	return (0);
 
-end;
-' language 'plpgsql';
+END;
 
+$$ LANGUAGE plpgsql;
+
 select inline_0();
 drop function inline_0();
