From: Sarah Hoffmann Date: Sat, 14 Apr 2012 07:27:10 +0000 (+0200) Subject: ignore postcode boundaries without postcode X-Git-Tag: v2.0.0~87 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/5f036d9923ee80b160648f43cd5e64d1b5f90a49 ignore postcode boundaries without postcode --- diff --git a/sql/functions.sql b/sql/functions.sql index c21ae1f9..5c4e9f2d 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -942,6 +942,11 @@ BEGIN -- By doing in postgres we have the country available to us - currently only used for postcode IF NEW.class in ('place','boundary') AND NEW.type in ('postcode','postal_code') THEN + IF NEW.postcode IS NULL THEN + -- most likely just a part of a multipolygon postcode boundary, throw it away + RETURN NULL; + END IF; + NEW.name := 'ref'=>NEW.postcode; IF NEW.country_code = 'gb' THEN