explicit cast for osm_type parameter in SQL needed

Otherwise PostgreSQL won't correctly pick up the index
condition.
This commit is contained in:
Sarah Hoffmann 2022-05-02 14:12:17 +02:00
parent 8163723e22
commit 08672cdf0a

View File

@ -120,7 +120,7 @@ BEGIN
IF location.members[i+1] = 'street' THEN
FOR parent IN
SELECT place_id from placex
WHERE osm_type = upper(substring(location.members[i], 1, 1))
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