I am facing an issue when doing full text search with PostgreSQL on text that contains de Spanish character 'Ñ'
When I try to tokenize the Spanish word 'AÑO' (year) I get the following results depending on if input is upper or lower case:
SELECT to_tsvector('spanish','AÑO'),to_tsquery('spanish','año')
"to_tsvector" "to_tsquery"
"'aÑo':1" "'año'"
As you can see result is not the same and it is case sensitive, so it makes my application full text search queries case sensitive if they contain this character.
Is there any way to overcome this issue? I have been searching on PostgreSQL documentation about full text search, and I don't know how to change this behaviour on installed dictionaries.
Thank you so much. Martí
client_encoding
?.. and server one?..t=# SELECT to_tsvector('spanish','AÑO'),to_tsvector('spanish','año'); to_tsvector | to_tsvector -------------+------------- 'año':1 | 'año':1 (1 row) Time: 69.873 ms t=# show client_encoding; client_encoding ----------------- UTF8 (1 row)
cant reproduce with UTF8 – Ellita