LammyL
2 years ago
0
3
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.

dijit2 years ago
Maybe this helps: 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.

sjamaandijit2 years ago
Look 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;
EwanToo2 years ago
Not really, no, it's doable but not easily