Re: order by different on mac vs linux

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: order by different on mac vs linux
Date: 2012-05-27 05:41:33
Message-ID: jpseqd$rg0$1@reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 2012-05-27, Wes James <comptekki(at)gmail(dot)com> wrote:
>>
>> Why is there a different order on the different platforms.

postgres uses the text comparison operators provided by the host
platform. for linux these are defined in the locales package
this may be part of the glibc package.

> I'd like to bring up my question again after testing on windows xp. Why
> does xp and mac os x sort properly when linux does not?

osx and windows hare broken sorting,

> I tested this last
> week with ubuntu 11.10 and it is doing the same thing as 12.04. UTF8
> encoding and lc_collate = en_US.UTF-8 on mac and linux and american_usa on
> windows which is the same thing as en_US.UTF-8. All are using UTF8
> encoding.
>
> I'd really like to use linux to host this DB (and have it hosted in vmware
> ESXi), but the order is not coming out correct. I've got foreign titles of
> books in this db, so I need the UTF8 all the way through. "C" won't cut it.

I briefly worked for a library software company. They had defined their own
ordering operator in the form of a function that mangled strings (they were
using paradox database)

As I understand it postgres allows you to define your own types with
their own ordering operators

even ignoring the issue of non-alphabetic symbols there are problems
that should be addressed for sorting titles and names. Many of these
are due to abbreviations which shouls be sorted asif expanded.

some examples:

St. Stephen of Hungary
Saint Stephen the Martyr
St. Rita
Street art.

Wall Stickers
Wall st.
Wall Street

McArthur
MacArthur, Douglass
Maccaroni

Wye Road
Y Road

--
⚂⚃ 100% natural

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message chester c young 2012-05-29 03:11:35 possible bug in psql
Previous Message Wes James 2012-05-27 03:47:19 Re: order by different on mac vs linux