Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 452F61337B81 for ; Tue, 10 May 2011 14:58:19 -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 74896-01-10 for ; Tue, 10 May 2011 17:57:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ew0-f46.google.com (mail-ew0-f46.google.com [209.85.215.46]) by mail.postgresql.org (Postfix) with ESMTP id 78FEC1337C3C for ; Tue, 10 May 2011 14:56:58 -0300 (ADT) Received: by ewy4 with SMTP id 4so1904857ewy.19 for ; Tue, 10 May 2011 10:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=MvR+1CZlhlcfgfVQcTIWxjFHw9rW1KF+t5ZYyqqrLTw=; b=dKDks032M/cjXkFLdnb5cUMN6uIXHNhr5MYY8YpaVfIXXMNuTRzEhJz5ULYS6JP1Ev m+3VKgGDefh+QnsWyaLhhxwW9ai8qqvY2SAEPyxVwecxOTgp6ibZVPEfcq0SkfA9fqea T9WMPhtQQ0+435eAP4oGJ99oIMr4WpQkdMlf0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=WBjt5bwiwGMcu9HnsCsuMIw1PV7qu/rJvlF3B7siABEVGBcYxPRs16xaTbPjQKqW2h v9mGrig/30iMkiNwB4y7HknSzeIy5UIMslEzT565T2a7mMW0qou8YbW1/D3MlrNYpX+2 /nWSD0poQMNj4gjYHxmbjb5VjoRI0byvKb7RU= MIME-Version: 1.0 Received: by 10.213.98.201 with SMTP id r9mr2938127ebn.42.1305050216939; Tue, 10 May 2011 10:56:56 -0700 (PDT) Received: by 10.213.9.81 with HTTP; Tue, 10 May 2011 10:56:56 -0700 (PDT) In-Reply-To: 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> <18244.1305046026@sss.pgh.pa.us> Date: Tue, 10 May 2011 11:56:56 -0600 Message-ID: Subject: Re: Sorting Issue From: Scott Marlowe To: Samuel Gendler Cc: Tom Lane , "Ozer, Pam" , emilu@encs.concordia.ca, pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201105/70 X-Sequence-Number: 35354 On Tue, May 10, 2011 at 11:45 AM, Samuel Gendler wrote: > > > On Tue, May 10, 2011 at 9:47 AM, Tom Lane wrote: >> >> "Ozer, Pam" writes: >> > Isn't this the English standard for collation? =A0Or is this a non-c >> > locale as mentioned below? =A0Is there anyway around this? >> >> > =A0 =A0 =A0 =A0LC_COLLATE =3D 'en_US.utf8' >> >> en_US is probably using somebody's idea of "dictionary order", which >> I believe includes ignoring spaces in the first pass. =A0You might be >> happier using "C" collation. =A0Unfortunately that requires re-initdb'in= g >> your database (as of existing PG releases). > > > ugh. So what's the initdb incantation necessary to sort the way I'd expec= t > an alphabetic sort to happen? =A0I'm literally just in the process of bri= nging > up a new project, so it's a perfect opportunity for me to get this set up > correctly to begin with. =A0THe default on my system was definitely > en_US.utf8. initdb --locale=3DC