X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0da481f207b1aabc5943ea4ab99914d9b1f50b82..1e9f37ab82db1758235bedf83c659693f4ca6c3e:/lib-sql/functions/placex_triggers.sql?ds=sidebyside 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);