Index: openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-drop.sql,v diff -u -N -r1.2.22.1 -r1.2.22.2 --- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-drop.sql 18 Aug 2014 20:54:39 -0000 1.2.22.1 +++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-drop.sql 5 Sep 2014 16:27:13 -0000 1.2.22.2 @@ -5,11 +5,11 @@ -- @version $Id$ -- -create function inline_0 () -returns integer as' -declare +CREATE FUNCTION inline_0 () +RETURNS integer AS $$ +DECLARE row RECORD; -begin +BEGIN for row in select bulk_mail_id from bulk_mail_messages loop perform bulk_mail__delete(row.bulk_mail_id); Index: openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql,v diff -u -N -r1.13.12.1 -r1.13.12.2 --- openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql 19 Aug 2014 07:43:33 -0000 1.13.12.1 +++ openacs-4/packages/evaluation/sql/postgresql/evaluation-drop.sql 5 Sep 2014 16:28:01 -0000 1.13.12.2 @@ -2,11 +2,11 @@ \i evaluation-calendar-drop.sql -create function inline_0 () -returns integer as' -declare +CREATE FUNCTION inline_0 () +RETURNS integer AS $$ +DECLARE del_rec record; -begin +BEGIN for del_rec in select item_id from cr_items where content_type in ('evaluation_grades', 'evaluation_tasks', 'evaluation_tasks_sols', 'evaluation_answers', 'evaluation_student_evals', 'evaluation_grades_sheets') loop @@ -15,14 +15,16 @@ return 0; END; $$ LANGUAGE plpgsql; + select inline_0 (); drop function inline_0 (); -create function inline_0 () -returns integer as' -declare + +CREATE FUNCTION inline_0 () +RETURNS integer AS $$ +DECLARE del_rec record; -begin +BEGIN for del_rec in select item_id from cr_items where content_type in ('evaluation_grades', 'evaluation_tasks', 'evaluation_tasks_sols', 'evaluation_answers', 'evaluation_student_evals', 'evaluation_grades_sheets') loop @@ -31,6 +33,7 @@ return 0; END; $$ LANGUAGE plpgsql; + select inline_0 (); drop function inline_0 (); @@ -50,20 +53,21 @@ select acs_object_type__drop_type('evaluation_task_group','f'); select acs_rel_type__drop_type('evaluation_task_group_rel','t'); -create function inline_1 () -returns integer as' -begin +CREATE FUNCTION inline_1 () +RETURNS integer AS $$ +DECLARE +BEGIN PERFORM acs_object_type__drop_type('evaluation_grades','f'); PERFORM acs_object_type__drop_type('evaluation_tasks','f'); PERFORM acs_object_type__drop_type('evaluation_tasks_sols','f'); PERFORM acs_object_type__drop_type('evaluation_answers','f'); PERFORM acs_object_type__drop_type('evaluation_grades_sheets','f'); PERFORM acs_object_type__drop_type('evaluation_student_evals','f'); PERFORM acs_object_type__drop_type('evaluation_task_groups','f'); - return 0; END; $$ LANGUAGE plpgsql; + select inline_1 (); drop function inline_1 (); @@ -105,4 +109,4 @@ select acs_object_type__drop_type('evaluation_task_group_rel','f'); -\i evaluation-package-drop.sql \ No newline at end of file +\i evaluation-package-drop.sql