X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/cb70a2fde33e9c2455ea1cfb37ee430b00058b82..1e9f37ab82db1758235bedf83c659693f4ca6c3e:/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);