From: Peter Eisentraut <peter_e@gmx.net>
To: pgsql-admin@postgresql.org
Cc: Erika Terahata Torres Prada e Silva - MPS <erika.prada@previdencia.gov.br>
Subject: Re: Issue on Varchar Ordering
Date: Thu, 17 Aug 2006 15:03:47 +0200
Message-ID: <200608171503.48269.peter_e@gmx.net> (raw)
In-Reply-To: <5519B95F9CA8B94DA8DE3F0A3337567201743A3F@wtdfl055.prevnet>
References: <5519B95F9CA8B94DA8DE3F0A3337567201743A3F@wtdfl055.prevnet>
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/
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: peter_e@gmx.net, erika.prada@previdencia.gov.br
Subject: Re: Issue on Varchar Ordering
In-Reply-To: <200608171503.48269.peter_e@gmx.net>
References: <5519B95F9CA8B94DA8DE3F0A3337567201743A3F@wtdfl055.prevnet> <200608171503.48269.peter_e@gmx.net>
* 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