Skip to content

There is a difference in string comparison between alpine and normal versions #1172

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
GarrisonD opened this issue Dec 19, 2023 · 4 comments

Comments

@GarrisonD
Copy link

Ran into #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?

@GarrisonD
Copy link
Author

I mean that would be cool to have the same behaviour out of the box for both alpine- and debian-based images.

@GarrisonD
Copy link
Author

#327

@LaurentGoderre
Copy link
Member

Have you tried setting your collation using the env var like this comment here: #1004 (comment)

@GarrisonD
Copy link
Author

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants