From 5f036d9923ee80b160648f43cd5e64d1b5f90a49 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 14 Apr 2012 09:27:10 +0200 Subject: [PATCH] ignore postcode boundaries without postcode --- sql/functions.sql | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5