Thread: Problem with sorting on PostgreSQL 9.0.3

Problem with sorting on PostgreSQL 9.0.3

From
Jean Pereira
Date:
I'm having a problem with the sort of names with accents 
In the version of postgres 8.4.3, I run the following command: 

SELECT name FROM person ORDER BY name 

And I have the following result: 

                       
name 
-------------------------------------------------- 
 
Abel Clara Valentin 
 
Abel Felipe Mundel 
 
Abel Lopes de Amorin 
 
Abel Rodriguez 
 
... 
 
Eric Alves de Lima 
 
Erico Borinelli 
 
Eric Brizola 
 
Eric Correa 
 
Eric Eichenberger 
 
Erico Eichstadt 
 
... 
 
Zulmira Fatima Ribeiro Albrecht 
 
Zulma Siewe 
 
Zulmira Dutra da Rocha 
(26,445 rows) 


The bank orders usually, he puts his name with an accent in the right order, or 
That is, he does not think the accent to order, from what I saw. 

In the PG version 9.0.3 
I run the same command and got the following result: 

                       
name 
-------------------------------------------------- 
 
Abel Clara Valentin 
 
Abel Felipe Mundel 
 
Abel Lopes de Amorin 
 
Abel Rodriguez 
 
... 
 
Eric Alves de Lima 
 
Erico Borinelli 
 
Eric Correa 
 
Eric Eichenberger 
 
Erico Eichstadt 
 
Erico Eischstaedt 
 
... 
 
Zulma Siewe 
 
Zulmira Fatima Ribeiro Albrecht 
 
Zulmira Dutra da Rocha 
 
<C3> <89> Rich Brizola 
(26,445 rows) 


The "<C3> <89> Brizola rich" equals "Eric Brizola" the outcome of PG 8.4.3. 

If someone can help me I appreciate it. 

Hug.

Re: Problem with sorting on PostgreSQL 9.0.3

From
Tom Lane
Date:
Jean Pereira <admin@olostech.com> writes:
> [ different sorting results in 8.4.3 and 9.0.3 ]

This probably means you have a different LC_COLLATE setting in the 9.0
installation than the 8.4 one.

            regards, tom lane