Re: Very puzzling sort behavior

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Very puzzling sort behavior
Дата
Msg-id CAEYLb_W9A7RKeHBjbfF7E64C=t539jhRpdiyEUp3x-mqEvmDsQ@mail.gmail.com
обсуждение исходный текст
Ответ на Very puzzling sort behavior  (Ken Tanzer <ken.tanzer@gmail.com>)
Ответы Re: Very puzzling sort behavior
Список pgsql-general
On Thu, Sep 10, 2015 at 12:51 PM, Ken Tanzer <ken.tanzer@gmail.com> wrote:
> OK, can one of you help me out in understanding this?  I would have thought that given "CLARK," and "CLARKE" that the
commawould get compared against the E and come first.  End of story, before we even get to anything farther in the
string. What am I missing? 

That's only how it works with the C locale. Otherwise, there are
complicated rules to weigh things like space and punctuation (and
accents/diacritics) less prominently than primary alphabetical
ordering. This is often useful. Anyway, based on what you say here, I
think you should actually "ORDER BY name_last, name_first".

--
Regards,
Peter Geoghegan


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

Предыдущее
От: Ken Tanzer
Дата:
Сообщение: Re: Very puzzling sort behavior
Следующее
От: Ken Tanzer
Дата:
Сообщение: Re: Very puzzling sort behavior