]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-sql/functions/placex_triggers.sql
look for postcode areas when finding something in the postcode table
[nominatim.git] / lib-sql / functions / placex_triggers.sql
index 386140f45c00d0f6fae651ccd970c19496ae78e7..0f74336fbc7d2312140219fb30ad547b7c9267cf 100644 (file)
@@ -1265,6 +1265,8 @@ BEGIN
     END IF;
   ELSEIF NEW.rank_address > 25 THEN
     max_rank := 25;
+  ELSEIF NEW.class in ('place','boundary') and NEW.type in ('postcode','postal_code') THEN
+    max_rank := NEW.rank_search;
   ELSE
     max_rank := NEW.rank_address;
   END IF;