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:
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.