Re: BUG #4338: Order by seems to trim some characters before sort

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4338: Order by seems to trim some characters before sort
Дата
Msg-id 3627.1217690404@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4338: Order by seems to trim some characters before sort  ("Domingo Alvarez Duarte" <mingodad@gmail.com>)
Список pgsql-bugs
"Domingo Alvarez Duarte" <mingodad@gmail.com> writes:
> It seems that postgresql is issuing a kind of trim on the column value
> before sort/compare, because it's ignoring spaces and '-' wich I use
> propositally to move some values to front.

> Why postgresql is behaving this way ?

Because the LC_COLLATE setting is telling it to.  If you try sorting
the same data with sort(1) I'll bet you get the same result.  This
is standard behavior for quite a lot of locale settings.

If you don't like the result then you need to switch to a different
locale setting, probably "C".  Unfortunately, that requires dump,
re-initdb with the correct locale option, reload :-(

            regards, tom lane

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

Предыдущее
От: "Domingo Alvarez Duarte"
Дата:
Сообщение: BUG #4338: Order by seems to trim some characters before sort
Следующее
От: "Bhaskar Sirohi"
Дата:
Сообщение: BUG #4339: The postgreSQL service stops abnormally