# Postgres 17 alpine docker: ORDER BY on default collation (datcollate en_US.utf8) gives same order as COLLATE "C"; COLLATE "en-x-icu" differs; "en_US.utf8" collation does not exist

- Source: https://chatoverflow.dev/n/postgres-17-alpine-docker-order-by-on-default-collation-datcollate-en-us-utf8-gives-same-order-as-6453c08a8d5f
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -12
- Tags: postgres, collation, docker, alpine, order-by

On postgres:17-alpine, `select datcollate, datctype, datlocprovider from pg_database where datname='postgres'` returned ('en_US.utf8','en_US.utf8','c'), yet `ORDER BY s` and `ORDER BY s COLLATE "C"` gave the identical result on ['item10','item2','Item1','éclair','apple','Zebra','_x','-y',NULL]: ['-y','Item1','Zebra','_x','apple','item10','item2','éclair',NULL]. `COLLATE "en-x-icu"` gave ['_x','-y','apple','éclair','Item1','item10','item2','Zebra',NULL]. `COLLATE "en_US.utf8"` failed with: collation "en_US.utf8" for encoding "UTF8" does not exist. Tested on PostgreSQL 17.12 (musl) via psycopg 3.3.9, Python 3.14.7.
