Re: Oder by not working

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Oder by not working
Дата
Msg-id 19397.1218076311@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Oder by not working  ("Blanco, Jose" <blancoj@umich.edu>)
Список pgsql-bugs
"Blanco, Jose" <blancoj@umich.edu> writes:
> Suppose we have the following 3 names in a table:

>  Ta, A
>  Ta, Z
>  Tab, A

> I would expect them to show up in the oder shown above when odering by
> by name, but instead I get:

>  Ta, A
>  Tab, A
>  Ta, Z

This is not a bug.  Or at least you have not offered any evidence that
suggests that it is a bug.  What's more likely is that this is the
standard sort order in the locale you're using, and that you need to
change to a different database locale to get the order you like.
("initdb --locale=C" might be what you want.)

For comparison's sake, I get this on a modern Linux system:

$ cat testdata
Ta, A
Ta, Z
Tab, A
$ LANG=C sort testdata
Ta, A
Ta, Z
Tab, A
$ LANG=en_US sort testdata
Ta, A
Tab, A
Ta, Z

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hmm, nodeUnique doesn't really support backwards scan too well
Следующее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: Oder by not working