]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-sql/functions/placex_triggers.sql
Merge pull request #2702 from lonvia/move-country-names-into-includes
[nominatim.git] / lib-sql / functions / placex_triggers.sql
index f92b211394763ec899e6edbf9f09250992972475..f8580d7faefe14e5f3e3f0934614ef45d6eee9a2 100644 (file)
@@ -120,7 +120,8 @@ BEGIN
       IF location.members[i+1] = 'street' THEN
         FOR parent IN
           SELECT place_id from placex
-           WHERE osm_type = 'W' and osm_id = substring(location.members[i],2)::bigint
+           WHERE osm_type = upper(substring(location.members[i], 1, 1))::char(1)
+                 and osm_id = substring(location.members[i], 2)::bigint
                  and name is not null
                  and rank_search between 26 and 27
         LOOP