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.1 -r1.2
--- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-drop.sql	15 May 2002 22:07:52 -0000	1.1
+++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-drop.sql	12 Jun 2002 13:53:13 -0000	1.2
@@ -5,20 +5,26 @@
 -- @version $Id$
 --
 
+create function inline_0 ()
+returns integer as'
+declare
+    row RECORD;
 begin
-    for row in (select bulk_mail_id from bulk_mail_messages) loop
-        bulk_mail__delete(row.bulk_mail_id);
+
+    for row in select bulk_mail_id from bulk_mail_messages loop
+        perform bulk_mail__delete(row.bulk_mail_id);
     end loop;
-end;
-/
-show errors
 
-begin
-    acs_object_type__drop_type('bulk_mail_message', 'f');
-end;
-/
-show errors
+    perform acs_object_type__drop_type(''bulk_mail_message'', ''f'');
 
+    return null;
+
+end;' language 'plpgsql';
+
+select inline_0();
+
+drop function inline_0 ();
+
 \i bulk-mail-package-drop.sql
 \i bulk-mail-views-drop.sql
 
