]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-sql/functions/placex_triggers.sql
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib-sql / functions / placex_triggers.sql
index 9a31f3ae327c338dc0d1538f68b51e03f1591148..e3be9503aa84eadca65e2f74d07e6e7aa5835d4b 100644 (file)
@@ -911,7 +911,7 @@ BEGIN
       -- determine postcode
       NEW.postcode := coalesce(token_normalized_postcode(NEW.address->'postcode'),
                                location.postcode,
-                               get_nearest_postcode(NEW.country_code, NEW.geometry));
+                               get_nearest_postcode(NEW.country_code, NEW.centroid));
 
       IF NEW.name is not NULL THEN
           NEW.name := add_default_place_name(NEW.country_code, NEW.name);