X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0da481f207b1aabc5943ea4ab99914d9b1f50b82..2e3c5d4c5b39e29af57a9398f20fdf5cad0e9045:/lib-sql/functions/placex_triggers.sql

diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql
index 9a31f3ae..e3be9503 100644
--- a/lib-sql/functions/placex_triggers.sql
+++ b/lib-sql/functions/placex_triggers.sql
@@ -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);
