Re: Sorting Discrepancy in PostgreSQL 14.13
От | Tomas Vondra |
---|---|
Тема | Re: Sorting Discrepancy in PostgreSQL 14.13 |
Дата | |
Msg-id | 69c7ee62-f9de-4365-b325-7e493203a7ae@vondra.me обсуждение исходный текст |
Ответ на | Sorting Discrepancy in PostgreSQL 14.13 ([3반]김민지_4904 <hzuiw33@gmail.com>) |
Ответы |
Re: Sorting Discrepancy in PostgreSQL 14.13
|
Список | pgsql-bugs |
Hi, On 11/14/24 13:49, [3반]김민지_4904 wrote: > > ... > > The minimized PoC is: > > ```sql > CREATE TABLE t0 (c0 TEXT); > INSERT INTO t0 (c0) VALUES ('-10'), ('20'), ('-5'), ('15'), ('-25'); > SELECT c0 FROM t0 ORDER BY c0; > ``` > > In PostgreSQL 14.13, the order is incorrect: > ``` > -10 > 15 > 20 > -25 > -5 > ``` > > While the correct order should be: > > ``` > -10 > -25 > -5 > 10 > 20 > ``` > > as '-' is smaller than '1', or '2' in ascii. > > I'm doubtful this is a collation issue, as most collations basically > respect ASCII order. > This is 99.999% due to the collation, so which collations are being used on these systems? Also, I don't get this "incorrect" behavior on 14.13, it behaves the same as 17 for me, producing the expected result. regards -- Tomas Vondra
В списке pgsql-bugs по дате отправления: