]> git.openstreetmap.org Git - nominatim.git/commitdiff
Ignore postcodes with comma and semicolon when computing address
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 7 Jun 2017 21:19:56 +0000 (23:19 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 7 Jun 2017 21:19:56 +0000 (23:19 +0200)
OSM has sometimes postcode lists for cities which should
simply be ignored.

Fixes #673.

sql/functions.sql

index 1d83e653c5f6a8202b6ea220538e0c6f592021c1..77af9263e3b483430f66bbe6ee6722d2b40f8d2f 100644 (file)
@@ -2420,7 +2420,7 @@ BEGIN
     IF searchpostcode IS NOT NULL and location.type = 'postcode' THEN
       location.isaddress := FALSE;
     END IF;
-    IF searchpostcode IS NULL and location.isaddress and location.type != 'postcode' and location.postcode IS NOT NULL THEN
+    IF searchpostcode IS NULL and location.isaddress and location.type != 'postcode' and location.postcode IS NOT NULL and location.postcode not similar to '%(,|;)%' THEN
       searchpostcode := location.postcode;
     END IF;
     IF location.rank_address = 4 AND location.isaddress THEN