Обсуждение: Collating Question...

Поиск
Список
Период
Сортировка

Collating Question...

От
Jerry LeVan
Дата:
Hi,

I am running 8.2.1 on my Mac OS X  and my X86 Fedora Laptop...

I just noticed that on my mac:

levan=# select 'A' < 'a' ;
?column?
----------
t
(1 row)

and on the linux box:

levan=# select 'A' < 'a' ;
?column?
----------
f
(1 row)

The locale function on the mac has everything set to "C"
and on the linux box it is all "en_US.UTF-8".

Is there a simple way to get the collating sequences to be
the same on both boxen?

If I do an "order by <text>" on the mac then if the referenced
field starts with a lower case letter then it will appear after
all of the fields that start with an upper case letter....

Thanks,

Jerry






Re: Collating Question...

От
Michael Glaesemann
Дата:
On Jan 16, 2007, at 11:52 , Jerry LeVan wrote:

> The locale function on the mac has everything set to "C"
> and on the linux box it is all "en_US.UTF-8".
>
> Is there a simple way to get the collating sequences to be
> the same on both boxen?

My understanding is that to have the same ordering you need to have
initdb'd with the same locale on both machines. Hopefully PostgreSQL
will have better collation support in the future.

Michael Glaesemann
grzm seespotcode net