For all of these queries:
SELECT label FROM personal.storage_disks ORDER BY label ASC;
SELECT label FROM personal.storage_disks ORDER BY label COLLATE "C" ASC;
SELECT label FROM personal.storage_disks ORDER BY label COLLATE "POSIX" ASC;
SELECT label FROM personal.storage_disks ORDER BY label COLLATE "default" ASC;
The output is always: DISK 1, DISK 10, DISK 2, DISK 3, [...]
But, I want and expect: DISK 1, DISK 2, DISK 3, [...] DISK 10
I'm out of collations to try now according to SELECT * FROM pg_collation;
... unless I'm supposed to use one of the many really weird ones with cryptic names. (I even tried a bunch of those with the same result.)
Please note that I've read the existing seemingly related SE questions as well as many articles on SORT BY
, but they didn't help and didn't clear up anything for me.
I'm using PostgreSQL 12.4