 *   delete_bridge_them_srf(pid int, objclass_id int) RETURNS int
 *   delete_bridge_them_srf(pids int[], objclass_ids int[]) RETURNS SETOF int
 *   delete_building(pid int, objclass_id int) RETURNS int
-*   delete_buildings(pids int[], objclass_ids int[]) RETURNS SETOF int
+*   delete_building(pids int[], objclass_ids int[]) RETURNS SETOF int
 *   delete_building_furniture(pid int, objclass_id int) RETURNS int
 *   delete_building_furniture(pids int[], objclass_ids int[]) RETURNS SETOF int
 *   delete_building_installation(pid int, objclass_id int) RETURNS int

LANGUAGE plpgsql STRICT;


CREATE OR REPLACE FUNCTION delete_cityobjectgroup_with_members(pids integer[])
  RETURNS SETOF integer AS
$BODY$

DECLARE
  deleted_id INTEGER;
  class_id INTEGER;
  waterboundary_srf_ids int[] := '{}';
BEGIN
  -- fetch objectclass_id if not set
  IF $2 = 0 THEN
