X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id D61219FA2E9 for ; Thu, 17 Aug 2006 10:04:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 47089-02 for ; Thu, 17 Aug 2006 13:03:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by postgresql.org (Postfix) with SMTP id 14B2D9FB1FC for ; Thu, 17 Aug 2006 10:03:56 -0300 (ADT) Received: (qmail invoked by alias); 17 Aug 2006 13:03:54 -0000 Received: from dslb-084-063-116-078.pools.arcor-ip.net (EHLO colt.pezone.net) [84.63.116.78] by mail.gmx.net (mp026) with SMTP; 17 Aug 2006 15:03:54 +0200 X-Authenticated: #495269 From: Peter Eisentraut To: pgsql-admin@postgresql.org Subject: Re: Issue on Varchar Ordering Date: Thu, 17 Aug 2006 15:03:47 +0200 User-Agent: KMail/1.9.3 Cc: Erika Terahata Torres Prada e Silva - MPS References: <5519B95F9CA8B94DA8DE3F0A3337567201743A3F@wtdfl055.prevnet> In-Reply-To: <5519B95F9CA8B94DA8DE3F0A3337567201743A3F@wtdfl055.prevnet> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608171503.48269.peter_e@gmx.net> X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/199 X-Sequence-Number: 22742 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/