]> git.openstreetmap.org Git - nominatim.git/blobdiff - sql/functions.sql
Merge pull request #734 from lonvia/use-pyosmium-for-updates
[nominatim.git] / sql / functions.sql
index 7b36ac50fec2c44679cc32fcaf616d165079fefc..3966e8222fdaed00b12f4af241d639969becf0f7 100644 (file)
@@ -2043,7 +2043,7 @@ BEGIN
       AND st_area(NEW.geometry) < st_area(existing.geometry)*0.5
       THEN
       INSERT INTO import_polygon_error (osm_type, osm_id, class, type, name, country_code, updated, errormessage, prevgeometry, newgeometry)
-        VALUES (NEW.osm_type, NEW.osm_id, NEW.class, NEW.type, NEW.name, NEW.country_code, now(), 
+        VALUES (NEW.osm_type, NEW.osm_id, NEW.class, NEW.type, NEW.name, NEW.address->'country', now(), 
         'Area reduced from '||st_area(existing.geometry)||' to '||st_area(NEW.geometry), existing.geometry, NEW.geometry);
       RETURN null;
     END IF;