Skip to content

Alpine version does not have same behavior for case-sensitive string comparisons in certain cases #1193

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

Closed
PythonCoderAS opened this issue Feb 8, 2024 · 2 comments

Comments

@PythonCoderAS
Copy link

Ran into a weird problem (Running docker desktop on M1 Mac):

When I do some exact string matches (SELECT * FROM table where name='Sample Name'), for some strings, it will return 0 results even though I can confirm there is a record with that string (by matching with the ID pkey). However, this does work if I do SELECT * FROM table where name LIKE '%Sample Name'. I've confirmed through looking at the raw bytes that there are no characters in front of the name.

However, if I change the version to the non-alpine version, SELECT * FROM table where name='Sample Name' starts returning the row as expected. I'm not sure why this is the case at all.

@yosifkit
Copy link
Member

yosifkit commented Feb 8, 2024

This seems similar to #273 / #276. And maybe also #327 and #1172

@PythonCoderAS
Copy link
Author

I fixed this for now by taking a database dump (while on the non-alpine version), deleting the volume, re-creating the volume, and importing the dump again into postgres while on alpine.

@yosifkit yosifkit closed this as completed Mar 3, 2025
# 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