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 E012B9FA50F for ; Thu, 17 Aug 2006 11:53:16 -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 75275-03 for ; Thu, 17 Aug 2006 14:52:59 +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 06C839FA0B9 for ; Thu, 17 Aug 2006 11:52:58 -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 k7HEqv6Y012537; Thu, 17 Aug 2006 07:52:58 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id B1FCCC2DC66; Thu, 17 Aug 2006 10:52:54 -0400 (CLT) Date: Thu, 17 Aug 2006 10:52:54 -0400 From: Alvaro Herrera To: Erika Terahata Torres Prada e Silva - MPS Cc: pgsql-admin@postgresql.org Subject: Re: RES: Issue on Varchar Ordering Message-ID: <20060817145254.GM318@alvh.no-ip.org> Mail-Followup-To: Erika Terahata Torres Prada e Silva - MPS , pgsql-admin@postgresql.org References: <5519B95F9CA8B94DA8DE3F0A3337567201781A5F@wtdfl055.prevnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5519B95F9CA8B94DA8DE3F0A3337567201781A5F@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 07:52:58 -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 X-Spam-Level: X-Archive-Number: 200608/204 X-Sequence-Number: 22747 Erika Terahata Torres Prada e Silva - MPS wrote: > Peter, > > Thanks for answering. > > But it's not correct to my language pt_BR and it worked correctly with > PostgreSQL at Windows and FreeBSD. I have this problem only with Debian and > now I'm looking for some Debian related issue. It's still correct -- it's the ordering you'll find on the telephone guide. It works the same for portuguese and for spanish and a lot others. The problem with going to C locale (POSIX), as suggested in a related follow-up, is that it sorts by byte value, which is not at all correct when you start sorting stuff that contains funny letters (accented vowels, etc). It works for english people just because they don't worry about accents at all. I wonder if portuguese has special sorting rules for "nh", for example? You'll lose that if you just change to the C locale. I think you _can_ define a collation on which spaces are significant, but it's also a significant amount of work. (And IMHO not at all worth the trouble.) -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support