Collating Question...

Started by Jerry LeVanabout 19 years ago2 messagesgeneral
Jump to latest
#1Jerry LeVan
jerry.levan@eku.edu

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

#2Michael Glaesemann
grzm@seespotcode.net
In reply to: Jerry LeVan (#1)
Re: Collating Question...

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