Index: openacs-4/packages/survey/sql/postgresql/survey-notifications-init.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/survey/sql/postgresql/survey-notifications-init.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/survey/sql/postgresql/survey-notifications-init.sql	15 Sep 2002 23:57:48 -0000	1.1
+++ openacs-4/packages/survey/sql/postgresql/survey-notifications-init.sql	30 Nov 2002 17:49:43 -0000	1.2
@@ -1,62 +1,71 @@
--- daveb: not tested, this will probably break on postgresql
 -- Survey
 --
--- -- @author dave@thedesignexperience.org, ben@openforce.biz
+-- @author dave@thedesignexperience.org, ben@openforce.biz
 -- @creation-date 2002-08-03
 --
 -- integration with Notifications
+create function inline_0 ()
+returns integer as '
 
 declare
         impl_id integer;
         v_foo   integer;
 begin
         -- the notification type impl
        impl_id := acs_sc_impl__new (
-                     'NotificationType',
-                     'survey_response_notif_type',
-                     'survey'
+                     ''NotificationType'',
+                     ''survey_response_notif_type'',
+                     ''survey''
                   );
 
-        v_foo := acs_sc_impl__new_alias (
-		    'NotificationType',
-                    'survey_response_notif_type',
-                    'GetURL',
-                    'survey::notification::get_url',
-                    'TCL'
+        v_foo := acs_sc_impl_alias__new (
+		    ''NotificationType'',
+                    ''survey_response_notif_type'',
+                    ''GetURL'',
+                    ''survey::notification::get_url'',
+                    ''TCL''
                  );
 
-	v_foo := acs_sc_impl__new_alias (
-                    'NotificationType',
-                    'survey_response_notif_type',
-                    'ProcessReply',
-                    'survey::notification::process_reply',
-                    'TCL'
+	v_foo := acs_sc_impl_alias__new (
+                    ''NotificationType'',
+                    ''survey_response_notif_type'',
+                    ''ProcessReply'',
+                    ''survey::notification::process_reply'',
+                    ''TCL''
                  );
 
-        acs_sc_binding__new (
-                    contract_name => 'NotificationType',
-                    impl_name => 'survey_response_notif_type'
+        perform acs_sc_binding__new (
+                    ''NotificationType'',
+                    ''survey_response_notif_type''
                  );
 
         v_foo:= notification_type__new (
-                short_name => 'survey_response_notif',
-                sc_impl_id => impl_id,
-                pretty_name => 'Survey Response Notification',
-                description => 'Notifications for Survey',
-                creation_user => NULL,
-                creation_ip => NULL
+		NULL,
+                impl_id,
+		''survey_response_notif'',
+                ''Survey Response Notification'',
+                ''Notifications for Survey'',
+                current_timestamp,
+                NULL,
+		NULL,
+		NULL 
                 );
 
         -- enable the various intervals and delivery methods
         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;
+select inline_0();
 
+drop function inline_0();
+
+
