Re: RES: RES: Issue on Varchar Ordering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux