From: Alvaro Herrera <alvherre@commandprompt.com>
To: Erika Terahata Torres Prada e Silva - MPS <erika.prada@previdencia.gov.br>
Cc: pgsql-admin@postgresql.org
Subject: Re: RES: Issue on Varchar Ordering
Date: Thu, 17 Aug 2006 10:52:54 -0400
Message-ID: <20060817145254.GM318@alvh.no-ip.org> (raw)
In-Reply-To: <5519B95F9CA8B94DA8DE3F0A3337567201781A5F@wtdfl055.prevnet>
References: <5519B95F9CA8B94DA8DE3F0A3337567201781A5F@wtdfl055.prevnet>
Erika Terahata Torres Prada e Silva - MPS wrote:
> Peter,
>
> Thanks for answering.
>
> But it's not correct to my language pt_BR and it worked correctly with
> PostgreSQL at Windows and FreeBSD. I have this problem only with Debian and
> now I'm looking for some Debian related issue.
It's still correct -- it's the ordering you'll find on the telephone
guide. It works the same for portuguese and for spanish and a lot
others. The problem with going to C locale (POSIX), as suggested in a
related follow-up, is that it sorts by byte value, which is not at all
correct when you start sorting stuff that contains funny letters
(accented vowels, etc). It works for english people just because they
don't worry about accents at all. I wonder if portuguese has special
sorting rules for "nh", for example? You'll lose that if you just
change to the C locale.
I think you _can_ define a collation on which spaces are significant,
but it's also a significant amount of work. (And IMHO not at all worth
the trouble.)
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: alvherre@commandprompt.com, erika.prada@previdencia.gov.br
Subject: Re: Issue on Varchar Ordering
In-Reply-To: <20060817145254.GM318@alvh.no-ip.org>
References: <5519B95F9CA8B94DA8DE3F0A3337567201781A5F@wtdfl055.prevnet> <20060817145254.GM318@alvh.no-ip.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox