 $$ 
 LANGUAGE plpgsql STRICT;
 
-CREATE AGGREGATE citydb_pkg1.intern_delete_cityobjects(int)
+CREATE AGGREGATE citydb_pkg.intern_delete_cityobjects(int)
 (
     sfunc = array_append,
     stype = int[],
-    finalfunc = citydb_pkg1.intern_delete_cityobjects
+    finalfunc = citydb_pkg.intern_delete_cityobjects
 );
 
 /*****************************************************************

  END IF;

  -- delete geometries and cityobject
  PERFORM citydb_pkg1.delete_cityobject_geometry(deleted_id);
  PERFORM citydb_pkg1.intern_delete_cityobject(deleted_id);

  RETURN deleted_id;
END; 

* @return
* array of IDs from deleted city object groups
******************************************************************/
CREATE OR REPLACE FUNCTION citydb_pkg.delete_cityobjectgroups(int[]) RETURNS int[] AS
$$
DECLARE
  result_array int[] := '{}';
