X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/4c7145c2938022d8355f49eb89a5ae1a68217a18..33c919ab09070ed0ec8f4d87366c5f9a0910e2c9:/sql/functions.sql?ds=sidebyside

diff --git a/sql/functions.sql b/sql/functions.sql
index 7b36ac50..3966e822 100644
--- a/sql/functions.sql
+++ b/sql/functions.sql
@@ -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;
