Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 21 Jan 2003 13:51:40 -0000 1.8.2.1 +++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 26 Feb 2003 02:27:58 -0000 1.8.2.2 @@ -186,11 +186,20 @@ select define_function_args ('notification_request__delete','request_id'); -create function notification_request__delete(integer) +create or replace function notification_request__delete(integer) returns integer as ' declare p_request_id alias for $1; + v_notifications record; begin + for v_notifications in select notification_id + from notifications n, notification_requests nr + where n.response_id = nr.object_id + and nr.request_id = p_request_id + loop + perform acs_object__delete(v_notifications.notification_id); + end loop; + perform acs_object__delete(p_request_id); return 0; end;