Answer the question
In order to leave comments, you need to log in
Trouble finding the letter "Y" in PostgreSQL 8.4
Good morning, dear habrazhiteli. Faced now with the strange behavior of PostgreSQL, when searching by the name and surname of users.
By chance, I have to use PostgreSQL 8.4, and ran into a problem.
There is a line in the request:
AND (ARRAY_TO_STRING(ARRAY[first_name, last_name] , ' ') ILIKE :search
Answer the question
In order to leave comments, you need to log in
1) What encoding and locale do you use?
2) On requests like
select '1' where 'Василий Иванов' ilike '%Й%'
does the error reproduce? AND first_name || ' ' || last_name ILIKE :search
A similar situation.
Let's say there are two strings in the database with the same words in UTF-8 encoding, locale RU:
1. Khanty-Mansiysk Autonomous Okrug
2. Khanty-Mansiysk Autonomous Okrug
select * from test where like (% Mansi%);we get the result equal to one line with number 1. At the same time, if I enter a query
select * from test where like (% Mansi%);then I get the result equal to one line with number 2. At the same time, please note that the requests have different endings "Y" and "I".
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question