From b6fd7b1857e235b0f880b4f8306963c1e42034c2 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 11 Sep 2014 19:42:52 +0200 Subject: [PATCH] lower significance of postcodes in Singapure Postcodes with 6 digits designate delivery points, i.e. houses. --- sql/functions.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sql/functions.sql b/sql/functions.sql index 2c415620..e2bfbbbc 100644 --- a/sql/functions.sql +++ b/sql/functions.sql @@ -1018,6 +1018,13 @@ BEGIN NEW.rank_address := 5; END IF; + ELSEIF NEW.calculated_country_code = 'sg' THEN + + IF NEW.postcode ~ '^([0-9]{6})$' THEN + NEW.rank_search := 25; + NEW.rank_address := 11; + END IF; + ELSEIF NEW.calculated_country_code = 'de' THEN IF NEW.postcode ~ '^([0-9]{5})$' THEN -- 2.39.5