Index: openacs-4/packages/calendar/sql/postgresql/calendar-notifications-init.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/sql/postgresql/calendar-notifications-init.sql,v
diff -u -N -r1.1 -r1.2
--- openacs-4/packages/calendar/sql/postgresql/calendar-notifications-init.sql	10 Jan 2004 18:59:50 -0000	1.1
+++ openacs-4/packages/calendar/sql/postgresql/calendar-notifications-init.sql	12 Aug 2013 09:34:30 -0000	1.2
@@ -1,44 +1,51 @@
 -- Calendar integration with Notifications
 
-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_notification_id   integer;
-begin
+BEGIN
         -- the notification type impl
         impl_id := acs_sc_impl__new (
-                      ''NotificationType'',
-                      ''calendar_notif_type'',
-                      ''calendars''
+                      'NotificationType',
+                      'calendar_notif_type',
+                      'calendars'
         );
 
         v_notification_id := acs_sc_impl_alias__new (
-                    ''NotificationType'',
-                    ''calendar_notif_type'',
-                    ''GetURL'',
-                    ''calendar::notification::get_url'',
-                    ''TCL''
+                    'NotificationType',
+                    'calendar_notif_type',
+                    'GetURL',
+                    'calendar::notification::get_url',
+                    'TCL'
         );
 
         v_notification_id := acs_sc_impl_alias__new (
-                    ''NotificationType'',
-                    ''calendar_notif_type'',
-                    ''ProcessReply'',
-                    ''calendar::notification::process_reply'',
-                    ''TCL''
+                    'NotificationType',
+                    'calendar_notif_type',
+                    'ProcessReply',
+                    'calendar::notification::process_reply',
+                    'TCL'
         );
 
         PERFORM acs_sc_binding__new (
-                    ''NotificationType'',
-                    ''calendar_notif_type''
+                    'NotificationType',
+                    'calendar_notif_type'
         );
 
         v_notification_id:= notification_type__new (
 	        NULL,
                 impl_id,
-                ''calendar_notif'',
-                ''Calendar Notification'',
-                ''Notifications for Entire Calendar Package'',
+                'calendar_notif',
+                'Calendar Notification',
+                'Notifications for Entire Calendar Package',
 		now(),
                 NULL,
                 NULL,
@@ -49,16 +56,17 @@
         insert into notification_types_intervals
         (type_id, interval_id)
         select v_notification_id, 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_notification_id, 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();
\ No newline at end of file
