 * ID of deleted city model
 ******************************************************************/
 -- generic function to delete any cityobject
-CREATE OR REPLACE FUNCTION citydb_pkg1.delete_cityobject(
+CREATE OR REPLACE FUNCTION citydb_pkg.delete_cityobject(
   co_id INTEGER,
   delete_members INTEGER DEFAULT 0,
   cleanup INTEGER DEFAULT 0

           class_id = 35 OR 
           class_id = 36 OR 
           class_id = 60 OR 
           class_id = 61 THEN deleted_id := citydb_pkg1.delete_thematic_surface($1);
      WHEN class_id = 38 OR 
           class_id = 39 THEN deleted_id := citydb_pkg1.delete_opening($1);
      WHEN class_id = 40 THEN deleted_id := citydb_pkg1.delete_building_furniture($1);
      WHEN class_id = 41 THEN deleted_id := citydb_pkg1.delete_room($1);
      WHEN class_id = 43 OR 
           class_id = 44 OR 
           class_id = 45 OR 
           class_id = 46 THEN deleted_id := citydb_pkg1.delete_transport_complex($1);
      WHEN class_id = 47 OR 
           class_id = 48 THEN deleted_id := citydb_pkg1.delete_traffic_area($1);
      WHEN class_id = 63 OR 
           class_id = 64 THEN deleted_id := citydb_pkg1.delete_bridge($1);
      WHEN class_id = 65 OR 
           class_id = 66 THEN deleted_id := citydb_pkg1.delete_bridge_installation($1);
      WHEN class_id = 68 OR 
           class_id = 69 OR 
           class_id = 70 OR 


  IF delete_members <> 0 THEN
    -- delete cityobjects not being referenced by a city model any more
    PERFORM citydb_pkg.delete_cityobjects(a.c_id) 
      FROM (
        SELECT unnest(cityobject_array) AS c_id
      ) a
