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 96EC49FB259 for ; Thu, 17 Aug 2006 18:32:37 -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 00304-03 for ; Thu, 17 Aug 2006 21:32:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id A53ED9FB254 for ; Thu, 17 Aug 2006 18:32:27 -0300 (ADT) Received: from alvh.no-ip.org (201-221-217-80.bk12-dsl.surnet.cl [201.221.217.80]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k7HLWQ3H021578; Thu, 17 Aug 2006 14:32:27 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id 93105C2DC66; Thu, 17 Aug 2006 17:32:06 -0400 (CLT) Date: Thu, 17 Aug 2006 17:32:06 -0400 From: Alvaro Herrera To: Erika Terahata Torres Prada e Silva - MPS Cc: pgsql-admin@postgresql.org Subject: Re: RES: RES: Issue on Varchar Ordering Message-ID: <20060817213206.GF318@alvh.no-ip.org> Mail-Followup-To: Erika Terahata Torres Prada e Silva - MPS , pgsql-admin@postgresql.org References: <5519B95F9CA8B94DA8DE3F0A33375672017BA006@wtdfl055.prevnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5519B95F9CA8B94DA8DE3F0A33375672017BA006@wtdfl055.prevnet> User-Agent: Mutt/1.5.12-2006-07-14 X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Thu, 17 Aug 2006 14:32:30 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, UPPERCASE_25_50 X-Spam-Level: X-Archive-Number: 200608/209 X-Sequence-Number: 22752 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