Index: openacs-4/packages/lars-blogger/sql/postgresql/rss-unregister.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/rss-unregister.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/lars-blogger/sql/postgresql/rss-unregister.sql	28 Aug 2003 09:41:55 -0000	1.2
+++ openacs-4/packages/lars-blogger/sql/postgresql/rss-unregister.sql	8 Dec 2003 05:10:23 -0000	1.3
@@ -6,6 +6,25 @@
 -- @cvs-id $Id$
 --
 
+-- need to delete our channels and rss feeds or else
+-- the SC can't be dropped
+
+create or replace function inline_0() 
+returns integer as '
+declare
+    channel_rec         record;
+begin
+    -- delete weblogger_channels
+    for channel_rec in select channel_id from weblogger_channels loop
+        perform weblogger_channel__delete(channel_rec.channel_id);
+    end loop;
+
+    return 0;
+end;' language 'plpgsql';
+
+select inline_0();
+drop function inline_0();
+
 select acs_sc_impl__delete(
   'RssGenerationSubscriber',        -- impl_contract_name
   'pinds_blog_entries'              -- impl_name
