]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/functions.sql
take ip6 addresses into account for log regex
[nominatim.git] / sql / functions.sql
index 658771b74c70f74b2d7658c50fa62d335ca6fae3..898cdb69530daefaee4f5faa2759e5fb24193830 100644 (file)
@@ -2035,6 +2035,12 @@ BEGIN
   END IF;
 
 
+  -- refuse to update multiplpoygons with too many objects, too much of a performance hit
+  IF ST_NumGeometries(NEW.geometry) > 2000 THEN
+    RAISE WARNING 'Dropping update of % % because of geometry complexity.', NEW.osm_type, NEW.osm_id;
+    RETURN NULL;
+  END IF;
+
   IF coalesce(existing.name::text, '') != coalesce(NEW.name::text, '')
      OR coalesce(existing.extratags::text, '') != coalesce(NEW.extratags::text, '')
      OR coalesce(existing.housenumber, '') != coalesce(NEW.housenumber, '')