8 ms·
Is there a good way to do case-insensitive accent-insensitive collations yet in postgresql? It’s been a holdup for using that for some use cases like searching
by LammyL 3y ago
Is there a good way to do case-insensitive accent-insensitive collations yet in postgresql? It’s been a holdup for using that for some use cases like searching for data, like a person’s name, in pgsql when the casing or accents don’t match perfectly.
Mssql has had this for ever, and I’m pretty sure MySQL has it as well.
- dijit 3y agoMaybe this helps: https://stackoverflow.com/posts/11007216/revisions https://stackoverflow.com/posts/11007216/revisions ? My gut tells me that I would do it in the query itself though, and not rely on the collation. Maybe I am misunderstanding.
- sjamaan 3y agoLook under "Update for Postgres 12 or later", there they create a collation, an index to make use of it and then a query to make use of it: SELECT \* FROM users WHERE name = 'João' COLLATE ignore_accent;
- EwanToo 3y agoNot really, no, it's doable but not easily