]> git.openstreetmap.org Git - nominatim.git/commitdiff
restrict admin_level change detection to boundary=administrative
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 8 Feb 2014 18:23:06 +0000 (19:23 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 8 Feb 2014 18:23:06 +0000 (19:23 +0100)
sql/functions.sql

index 49a6e97288fc0666538e8647fe23dd8162beabb3..d9a5d1be80a9e28d1826442127000d36fb4911a4 100644 (file)
@@ -2092,7 +2092,7 @@ BEGIN
 
   -- To paraphrase, if there isn't an existing item, OR if the admin level has changed
   IF existingplacex.osm_type IS NULL OR
-     coalesce(existingplacex.admin_level, 15) != coalesce(NEW.admin_level, 15)
+    (coalesce(existingplacex.admin_level, 15) != coalesce(NEW.admin_level, 15) AND existingplacex.class = 'boundary' AND existingplacex.type = 'administrative')
   THEN
 
     IF existingplacex.osm_type IS NOT NULL THEN