A
A
Artem00712020-09-28 15:48:37
PostgreSQL
Artem0071, 2020-09-28 15:48:37

Transliteral search?

The table has name = A101etc.
How would it be more correct to make this string searched both as English and as Russian "A"?

Now, in general, the search goes through ilike:
select * from rooms where name ilike %?%

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
ComodoHacker, 2020-09-28
@ComodoHacker

Write the transliteration in the next column, index and search in two columns.

K
Konstantin Tsvetkov, 2020-09-29
@tsklab

SELECT * FROM rooms WHERE name = 'A101' OR name = 'А101'

Or create a table of options, then it will find and A1О1', AI01'and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question