]> git.openstreetmap.org Git - nominatim.git/commitdiff
take country names only from relations
authorSarah Hoffmann <lonvia@denofr.de>
Thu, 12 Oct 2017 19:03:03 +0000 (21:03 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Thu, 12 Oct 2017 19:03:03 +0000 (21:03 +0200)
sql/functions.sql

index a9bca5423dc03d327c3cccbd6d20cb3df4e61a65..596bf808c35e2715400c3c5d930b37ca9b64fea3 100644 (file)
@@ -1757,7 +1757,7 @@ BEGIN
   END IF;
 
   -- make sure all names are in the word table
-  IF NEW.admin_level = 2 AND NEW.class = 'boundary' AND NEW.type = 'administrative' AND NEW.country_code IS NOT NULL THEN
+  IF NEW.admin_level = 2 AND NEW.class = 'boundary' AND NEW.type = 'administrative' AND NEW.country_code IS NOT NULL AND NEW.osm_type = 'R' THEN
     perform create_country(NEW.name, lower(NEW.country_code));
     --DEBUG: RAISE WARNING 'Country names updated';
   END IF;