X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3c68b12176c3b7f00dc4b3f5f00b3f63ba1b4c12..ea69733082106f4e8cc6077f744e5ce7ca256f2d:/lib-sql/functions/placex_triggers.sql

diff --git a/lib-sql/functions/placex_triggers.sql b/lib-sql/functions/placex_triggers.sql
index f92b2113..2c1b3bdb 100644
--- a/lib-sql/functions/placex_triggers.sql
+++ b/lib-sql/functions/placex_triggers.sql
@@ -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))
+                 and osm_id = substring(location.members[i], 2)::bigint
                  and name is not null
                  and rank_search between 26 and 27
         LOOP
