Re: lc_collate issue - Mailing list pgsql-general

From Tom Lane
Subject Re: lc_collate issue
Date
Msg-id 5091.1187986597@sss.pgh.pa.us
Whole thread Raw
In response to lc_collate issue  (Cody Pisto <cpisto@rvweb.com>)
Responses Re: lc_collate issue  (Cody Pisto <cpisto@rvweb.com>)
List pgsql-general
Cody Pisto <cpisto@rvweb.com> writes:
> I'm looking for any kind of a reason (and potential workarounds), be it
> bug or otherwise, why the following two queries produce different
> results under a database encoding of UTF8 and lc_collate of en_US.UTF-8:

That's just how it is in most non-C locales --- they use some weird
algorithm that's alleged to approximate what dictionary makers
traditionally do with phrases.  I don't recall the details but there's
something about multiple passes with spaces being ignored in earlier
passes.  You'll find that sort(1) sorts these lines the same way.

If you don't like it, use C locale, or put together your own locale
definition.  (No, I'm not sure how hard that is ...)

            regards, tom lane

pgsql-general by date:

Previous
From: Vivek Khera
Date:
Subject: Re: PostgreSQL vs Firebird feature comparison finished
Next
From: Cody Pisto
Date:
Subject: Re: lc_collate issue