From: Sarah Hoffmann Date: Sat, 19 Sep 2020 15:23:40 +0000 (+0200) Subject: ignore postcodes with colons X-Git-Tag: v3.6.0~72^2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/731c620e314e61a958f99a14556983e73ed914be?ds=sidebyside;hp=-c ignore postcodes with colons Colons are used as a delimiter in tiger:left and tiger:right tags when multiple postcodes are given. Ignore those. This was already done in the postcode update script. This changes just makes the two places consistent where postcodes are added. --- 731c620e314e61a958f99a14556983e73ed914be diff --git a/sql/functions/placex_triggers.sql b/sql/functions/placex_triggers.sql index a935b75a..0bfefbb0 100644 --- a/sql/functions/placex_triggers.sql +++ b/sql/functions/placex_triggers.sql @@ -643,7 +643,7 @@ BEGIN addr_street := NEW.address->'street'; addr_place := NEW.address->'place'; - IF NEW.address ? 'postcode' and NEW.address->'postcode' not similar to '%(,|;)%' THEN + IF NEW.address ? 'postcode' and NEW.address->'postcode' not similar to '%(:|,|;)%' THEN i := getorcreate_postcode_id(NEW.address->'postcode'); END IF; END IF;