pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: RES: Issue on Varchar Ordering
Date: Thu, 17 Aug 2006 17:32:06 -0400
Message-ID: <20060817213206.GF318@alvh.no-ip.org> (raw)
In-Reply-To: <5519B95F9CA8B94DA8DE3F0A33375672017BA006@wtdfl055.prevnet>
References: <5519B95F9CA8B94DA8DE3F0A33375672017BA006@wtdfl055.prevnet>

Erika Terahata Torres Prada e Silva - MPS wrote:
> 
> Thanks everybody.
> 
> 
> The correct order in Portuguese would return as brazilian telephone guide
> order as below: 
> 
> select * from aluno order by nome
> 	id	nome
> 	38	GABRIEL ALCIDES KLIM PERONDI
> 	40	GABRIEL ALEXANDRE DA SILVA MANICA
> 	36	GABRIELA HELEDA DE SOUZA
> 	37	GABRIELA JACOBY NOS
> 	39	GABRIELA LETICIA BATISTA NUNES
> 
> Indeed using POSIX, C, the result above is Ok, but it doesn't work for me
> because of the accented and special characters.

I stand corrected -- that is the sort order returned by sort under the
pt_BR locale (which is indeed different from the spanish sort order).

What's your lc_collate setting?  What does this return on your system?

LC_COLLATE=pt_PT sort << EOF
GABRIEL ALEXANDRE DA SILVA MANICA
GABRIELA JACOBY NOS
GABRIELA HELEDA DE SOUZA
GABRIELA LETICIA BATISTA NUNES
GABRIEL ALCIDES KLIM PERONDI
EOF

On my system it outputs the order you show above, which shows that my
locale is correctly defined per your expectations.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support



view thread (4+ messages)  latest in thread

Message-ID: <20060817213206.GF318@alvh.no-ip.org>
Permalink:  ../20060817213206.GF318@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20060817213206.GF318@alvh.no-ip.org

 · 

reply

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: <20060817213206.GF318@alvh.no-ip.org>
  References: <5519B95F9CA8B94DA8DE3F0A33375672017BA006@wtdfl055.prevnet> <20060817213206.GF318@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