Re: [HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Rodrigo Hjort
Thanks all. I'm gonna try other locales and encodings.2006/3/29, Tom Lane <[EMAIL PROTECTED]>: "Rodrigo Hjort" <[EMAIL PROTECTED]> writes:> The fact is that I can't raise PostgreSQL with C encoding, as special> characters are used on most tables. You're confusing locale and encoding, which are two

Re: [HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Tom Lane
"Rodrigo Hjort" <[EMAIL PROTECTED]> writes: > The fact is that I can't raise PostgreSQL with C encoding, as special > characters are used on most tables. You're confusing locale and encoding, which are two different (though interrelated) things. I suspect the right choice for you will be to use C

Re: [HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Rodrigo Hjort
Yeah, I think there's a problem on Linux locales.Using the C locale, it works as expected:[EMAIL PROTECTED]:~$ export LC_ALL=C && cat test.txt | sortGABRIEL ALCIDES KLIM PERONDIGABRIEL ALEXANDRE DA SILVA MANICA GABRIELA HELEDA DE SOUZAGABRIELA JACOBY NOSGABRIELA LETICIA BATISTA NUNESBut when using

Re: [HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Jonah H. Harris
I don't think PostgreSQL's sorting it wrong... here's the output of Linux's sort utility: [EMAIL PROTECTED]:~> cat test.txt GABRIEL ALEXANDRE DA SILVA MANICA GABRIELA LETICIA BATISTA NUNES GABRIEL ALCIDES KLIM PERONDI GABRIELA JACOBY NOS GABRIELA HELEDA DE SOUZA [EMAIL PROTECTED]:~> cat test.txt

[HACKERS] Issue on Varchar Ordering

2006-03-29 Thread Rodrigo Hjort
Pg-Hackers,I'm having the following issue:create table aluno (id serial, nome varchar(60));rodrigo=# select * from aluno order by nome offset 35 limit 5; id |   nome+---  36 | GABRIELA HELEDA DE SOUZA 37 | GABRIELA JACOBY NOS 38 | GABRIEL ALCIDES KLIM