Answer the question
In order to leave comments, you need to log in
How to work with trigrams in PostgreSQL?
When working with trigrams, a request in Latin is processed perfectly, but for some reason it turns out to be "krakoyazbra" with Cyrillic. How to work with trigrams correctly so that the returned values are similar to Latin (in the example) when you have Cyrillic?
Database in UTF-8.
Latin example:
select show_trgm('Naberezhnye Chelny');
show_trgm
-------------------------------------------------------------------------------------------
{" c"," n"," ch"," na",abe,ber,che,eln,ere,ezh,hel,hny,lny,nab,"ny ",nye,rez,"ye ",zhn}
(1 row)
select show_trgm('Набережные Челны');
show_trgm
-----------------------------------------------------------------------------------------------------------------------------
---------------------
{0x80d117,0x80df55,0x86b2c8,0x8f7d47,0x986ebe,0xa2d61a,0xa2226a,0xadf03c,0xceb992,0xe18a23,0x025732,0x13b218,5mm,0x3c6e80,0x
6351ac,udl,0x764fb5}
(1 row)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question