Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id B9F061337C05 for ; Tue, 10 May 2011 13:47:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 24944-08-2 for ; Tue, 10 May 2011 16:47:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 562EE1337C02 for ; Tue, 10 May 2011 13:47:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4AGl6FS018245; Tue, 10 May 2011 12:47:06 -0400 (EDT) To: "Ozer, Pam" cc: "Samuel Gendler" , emilu@encs.concordia.ca, pgsql-sql@postgresql.org Subject: Re: Sorting Issue In-reply-to: <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85FB@mail-001.corp.automotive.com> References: <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85F1@mail-001.corp.automotive.com> <4DC84284.4000903@encs.concordia.ca> <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85F7@mail-001.corp.automotive.com> <4DC845EC.1020806@encs.concordia.ca> <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85F8@mail-001.corp.automotive.com> <4DC850CC.50409@encs.concordia.ca> <4547.1304976514@sss.pgh.pa.us> <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85F9@mail-001.corp.automotive.com> <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85FA@mail-001.corp.automotive.com> <216FFB77CBFAEE4B8EE4DF0A939FF1D14F85FB@mail-001.corp.automotive.com> Comments: In-reply-to "Ozer, Pam" message dated "Tue, 10 May 2011 08:26:27 -0700" Date: Tue, 10 May 2011 12:47:06 -0400 Message-ID: <18244.1305046026@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/62 X-Sequence-Number: 35346 "Ozer, Pam" writes: > Isn't this the English standard for collation? Or is this a non-c > locale as mentioned below? Is there anyway around this? > LC_COLLATE = 'en_US.utf8' en_US is probably using somebody's idea of "dictionary order", which I believe includes ignoring spaces in the first pass. You might be happier using "C" collation. Unfortunately that requires re-initdb'ing your database (as of existing PG releases). regards, tom lane