Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql	4 Jun 2006 00:45:38 -0000	1.23
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-metadata-create.sql	24 Sep 2006 11:45:08 -0000	1.24
@@ -574,9 +574,18 @@
   drop_type__object_type            alias for $1;  
   drop_type__cascade_p              alias for $2;  -- default ''f''
   row                               record;
+  object_row                        record;
 begin
-    -- XXX: drop_type cascade_p is ignored (ignored in oracle too, but defaults f)
 
+   if drop_type__cascade_p then
+     for object_row in select object_id
+                         from acs_objects
+                         where object_type = drop_type__object_type
+     loop
+       PERFORM acs_object__delete (object_row.object_id);
+     end loop;
+   end if;
+
     -- drop all the attributes associated with this type
     for row in select attribute_name 
                  from acs_attributes 
