From: Sarah Hoffmann Date: Thu, 12 Oct 2017 19:03:55 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/master' X-Git-Tag: deploy~359 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/85530b3c52c2dc20cacb665c695402d2aa503954?hp=-c Merge remote-tracking branch 'upstream/master' --- 85530b3c52c2dc20cacb665c695402d2aa503954 diff --combined sql/functions.sql index 820bdbf8,596bf808..97baf52b --- a/sql/functions.sql +++ b/sql/functions.sql @@@ -1757,7 -1757,7 +1757,7 @@@ BEGI END IF; -- make sure all names are in the word table - IF NEW.admin_level = 2 AND NEW.class = 'boundary' AND NEW.type = 'administrative' AND NEW.country_code IS NOT NULL THEN + IF NEW.admin_level = 2 AND NEW.class = 'boundary' AND NEW.type = 'administrative' AND NEW.country_code IS NOT NULL AND NEW.osm_type = 'R' THEN perform create_country(NEW.name, lower(NEW.country_code)); --DEBUG: RAISE WARNING 'Country names updated'; END IF; @@@ -2503,7 -2503,7 +2503,7 @@@ BEGI select placex.place_id, osm_type, osm_id, name, CASE WHEN extratags ? 'place' THEN 'place' ELSE class END as class, CASE WHEN extratags ? 'place' THEN extratags->'place' ELSE type END as type, - admin_level, fromarea, isaddress, + admin_level, fromarea, isaddress and linked_place_id is NULL as isaddress, CASE WHEN address_place_id = for_place_id AND rank_address = 0 THEN 100 WHEN rank_address = 11 THEN 5 ELSE rank_address END as rank_address, distance,country_code,postcode from place_addressline join placex on (address_place_id = placex.place_id)