X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8b1a509442a3fa051146f82b8293126916ad8617..e7b4fc70e786d6914ffad2bc424535b40c1db675:/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);