There is a difference in string comparison between alpine and normal versions
Ran into https://github.com/docker-library/postgres/issues/851 using postgres:16.1-alpine
In README.md it's said:
Also of note, Alpine-based variants starting with Postgres 15 support ICU locales. Previous Postgres versions based on alpine do not support locales; see "Character sets and locale" in the musl documentation for more details.
As far as I understand, now it should be possible to build the alpine-based image with the correct en-US.UTF-8 collation and have proper string comparison. Or do I miss anything?
I mean that would be cool to have the same behaviour out of the box for both alpine- and debian-based images.
https://github.com/docker-library/postgres/issues/327
Have you tried setting your collation using the env var like this comment here: https://github.com/docker-library/postgres/issues/1004#issuecomment-1280559846
Yes, that helps. But my question is not how to fix it but rather why ENV POSTGRES_INITDB_ARGS "--locale-provider=icu --icu-locale=en-US" isn't part of alpine-based image? Developers use alpine-based images to make the dev setup faster and smaller but they don't know that it comes with the price of different behaviour.