Re: BUG #16789: Wrong order by output

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16789: Wrong order by output
Дата
Msg-id 662062.1608673851@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #16789: Wrong order by output  (PG Bug reporting form <noreply@postgresql.org>)
Список pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I don't know if there is anything specific to do for having a proper ordered
> output, but the result seems wrong to me.

You need to use a locale (collation) that matches your expectations.

FWIW, I get the same ordering you show with COLLATE "en_US" on a
Linux box, and it's likely that glibc would use similar ordering
rules for some other languages.  The behavior you say you want
looks like it'd match COLLATE "C", though that might act a little
funny with non-ASCII characters.

(I'm not here to defend glibc's sorting rules, but I think what
they're doing in this example is ignoring spaces in the first pass.)

You can find more about this topic in

https://www.postgresql.org/docs/current/charset.html

            regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Першин Юрий Петрович
Дата:
Сообщение: RE: BUG #16787: ODBC driver (libpq.dll, psqlodbc30a.dll, psqlodbc30w.dll) issues
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #16780: Inconsistent recovery_target_xid handling across platforms