X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5b20fa7e38d81d0a7e63aaf3c64c3ab80916ff38..6f55c67d1688e683769ea6a1fc4ed5aa913ffe97:/sql/functions/normalization.sql?ds=inline diff --git a/sql/functions/normalization.sql b/sql/functions/normalization.sql index 1a8bbd84..08087172 100644 --- a/sql/functions/normalization.sql +++ b/sql/functions/normalization.sql @@ -81,7 +81,8 @@ BEGIN lookup_word := upper(trim(postcode)); lookup_token := ' ' || make_standard_name(lookup_word); SELECT min(word_id) FROM word - WHERE word_token = lookup_token and class='place' and type='postcode' + WHERE word_token = lookup_token and word = lookup_word + and class='place' and type='postcode' INTO return_word_id; IF return_word_id IS NULL THEN return_word_id := nextval('seq_word');