pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Issue on Varchar Ordering
2+ messages / 2 participants
[nested] [flat]

* Issue on Varchar Ordering
@ 2006-08-16 14:25  Erika Terahata Torres Prada e Silva - MPS <erika.prada@previdencia.gov.br>
  0 siblings, 1 reply; 2+ messages in thread

From: Erika Terahata Torres Prada e Silva - MPS @ 2006-08-16 14:25 UTC (permalink / raw)
  To: pgsql-admin

I´m with the same problem at order by  at version 8.0.3 and O.S. Debian.
I´ve tried with locale C, UTF8, encoding LATIN1, UNICODE  and it did't work.
 
 
*	From: "Rodrigo Hjort" < <mailto:rodrigo.hjort@DOMAIN.HIDDEN> rodrigo
( dot ) hjort ( at ) gmail ( dot ) com> 
*	To:  <mailto:pgsql-hackers@DOMAIN.HIDDEN> pgsql-hackers ( at )
postgresql ( dot ) org 
*	Subject: Issue on Varchar Ordering 
*	Date: Wed, 29 Mar 2006 12:04:36 -0300 
  _____  

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 PERONDI
 39 | GABRIELA LETICIA BATISTA NUNES
 40 | GABRIEL ALEXANDRE DA SILVA MANICA
(5 registros)
 
The problem is that records with id 38 and 40 might come before the others.
It seems that the spacing isn't considered on ordering. 
The encoding (LATIN1) is correct according to Brazilian Portuguese, and the
settings are listed below.
 

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Issue on Varchar Ordering
@ 2006-08-17 13:03  Peter Eisentraut <peter_e@gmx.net>
  parent: Erika Terahata Torres Prada e Silva - MPS <erika.prada@previdencia.gov.br>
  0 siblings, 0 replies; 2+ messages in thread

From: Peter Eisentraut @ 2006-08-17 13:03 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Erika Terahata Torres Prada e Silva - MPS <erika.prada@previdencia.gov.br>

Erika Terahata Torres Prada e Silva - MPS wrote:
> 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 PERONDI
>  39 | GABRIELA LETICIA BATISTA NUNES
>  40 | GABRIEL ALEXANDRE DA SILVA MANICA
> (5 registros)
>
> The problem is that records with id 38 and 40 might come before the
> others. It seems that the spacing isn't considered on ordering.

That is, for practical purposes, correct.

May I suggest that you properly normalize your tables, by putting given 
name and family name into separate columns.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2006-08-17 13:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-16 14:25 Issue on Varchar Ordering Erika Terahata Torres Prada e Silva - MPS <erika.prada@previdencia.gov.br>
2006-08-17 13:03 ` Peter Eisentraut <peter_e@gmx.net>

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