What is the meaning of "-x-icu" in PostgreSQL's "collates"?
6
votes
1
answer
4678
views
I had this query:
SELECT * FROM table ORDER BY label ASC;
Since the labels are not in English, they didn't get sorted in the right order (ones beginning with "ö" were not in the bottom/end).
I therefore tried:
SELECT * FROM table ORDER BY label COLLATE "sv-SE" ASC;
SELECT * FROM table ORDER BY label COLLATE "sv_SE" ASC;
These gave errors about those collations not existing, which baffled me.
After a bunch of searching, I figured out to do:
SELECT * FROM pg_collation;
Which revealed that it's supposed to be:
sv-SE-x-icu
It worked when I used that identifier, but what's with the "-x-icu" stuff? What's that all about? I hate that they always have to mess with the standard locale identifiers so you can never rely on just the standard "language_location" format.
Asked by Tadhg Mocniak
(69 rep)
Feb 21, 2020, 04:30 PM
Last activity: Apr 30, 2020, 05:30 AM
Last activity: Apr 30, 2020, 05:30 AM