Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Incorrect sort on bullseye and buster #905

Closed
NicholasNoise opened this issue Nov 11, 2021 · 3 comments
Closed

Incorrect sort on bullseye and buster #905

NicholasNoise opened this issue Nov 11, 2021 · 3 comments

Comments

@NicholasNoise
Copy link

NicholasNoise commented Nov 11, 2021

This issue occurs on any version of postgres based on bullseye and buster.
Test case:

with person(lastname,firstname,middlename,birthdate) as (
  VALUES 
  ('Семенова','Алена','Сергеевна',TO_DATE('11.01.2008','DD.MM.YYYY')),
  ('Семенова','Алёна','Константиновна',TO_DATE('06.01.2020','DD.MM.YYYY')),
  ('Семенова','Альбина','Георгиевна',TO_DATE('07.09.1940','DD.MM.YYYY')),
  ('Семёнова','Алёна','Витальевна',TO_DATE('12.03.2021','DD.MM.YYYY')))
select (p.lastname || ' ' ||  p.firstname || coalesce(' ' || p.middlename, '') || ', ' || to_char(p.birthdate,'DD.MM.YYYY')) FullName
from person p
order by FullName;

Valid order is 1-2-3-4 (as presented in person table), on bullseye and buster - 4-2-1-3.
Also order by p.lastname, p.firstname, p.middlename works identically (and correct) on any image.
It seems that symbols е and ё are considered the same for concatenated strings ONLY.

It appears that system library libc-bin has a breaking change between 2.24 and 2.28.
I have locally builded 12.8-stretch and it works as expected.

I actually dont know what to do with this information, but to log it here.

@ImreSamu
Copy link
Contributor

@NicholasNoise : related thread in the PostgreSQL mail list "Wrong sorting on docker image" + Russian collation ( Date: 2021-10-16 )

@tianon
Copy link
Member

tianon commented Nov 12, 2021

I think #582 is probably also useful 😬

@tianon
Copy link
Member

tianon commented Jun 11, 2022

Going to close as I don't think there's anything we can do here to fix this in the image (but if more debugging is done and it turns out there's a straightforward fix, a PR would be interesting! ❤️) 👍

@tianon tianon closed this as completed Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants