Re: order by different on mac vs linux

Поиск
Список
Период
Сортировка
От Wes James
Тема Re: order by different on mac vs linux
Дата
Msg-id CAFjCMHvNJXz4-z1PXw0K=Eg+dn6Q2DCyf4LW0FGszJFqPtCSRA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: order by different on mac vs linux  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
On Mon, May 14, 2012 at 5:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Wes James <comptekki@gmail.com> writes:
>> Why is there a different order on the different platforms.
>
> This is not exactly unusual.  You should first check to see if
> lc_collate is set differently in the two installations --- but even if
> it's the same, there are often platform-specific interpretations of
> the sorting rules.  (Not to mention that OS X is flat out broken when
> it comes to sorting UTF8 data ...)
>
> If you want consistent cross-platform results, "C" locale will get
> that for you, but it's pretty stupid about non-ASCII characters.
>
> For more info read
> http://www.postgresql.org/docs/9.1/static/charset.html
>
>                        regards, tom lane

I checked both and they both say this:


show lc_collate;lc_collate
-------------en_US.UTF-8
(1 row)


You mention OS X is broken, but it looks like the linux box is broken
in this case.

With the current database I have, it looks like everything is sorting
correctly on both platforms, except those two records (the two lines
from my first email) which I added later for testing characters and
escaping, etc. on a web app.

-wes


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

Предыдущее
От: Misa Simic
Дата:
Сообщение: Re: SELECT 1st field
Следующее
От: Wes James
Дата:
Сообщение: Re: order by different on mac vs linux