Re: Unexpected behavior sorting strings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Unexpected behavior sorting strings
Дата
Msg-id 30446.1586360871@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Unexpected behavior sorting strings  ("Jimmy Thrasher" <jimmy@jimmythrasher.com>)
Список pgsql-general
"Jimmy Thrasher" <jimmy@jimmythrasher.com> writes:
> As I understand it, postgresql sorts strings roughly like strcmp does: character by character based on encoding
value.

Only if you're using C locale.  Other locales such as en_US have
completely different rules, which most hackers tend to find pretty
unintelligible and inconsistent :-(.  In your example, I think
the first-pass sort is on just the letters, and only if those are
the same will it consider the punctuation.

            regards, tom lane



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