Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A61246349D6 for ; Thu, 16 Apr 2009 11:13:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 72778-05 for ; Thu, 16 Apr 2009 11:13:14 -0300 (ADT) 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 E3528633275 for ; Thu, 16 Apr 2009 11:13: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 n3GEDKoG016743; Thu, 16 Apr 2009 10:13:20 -0400 (EDT) To: Mikel Lindsaar cc: pgsql-sql@postgresql.org Subject: Re: Ordering a name list and ignoring whitespace In-reply-to: <57a815bf0904160351v7282fd00p7b7d9690ca48dcff@mail.gmail.com> References: <57a815bf0904160351v7282fd00p7b7d9690ca48dcff@mail.gmail.com> Comments: In-reply-to Mikel Lindsaar message dated "Thu, 16 Apr 2009 20:51:37 +1000" Date: Thu, 16 Apr 2009 10:13:20 -0400 Message-ID: <16742.1239891200@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.161 tagged_above=0 required=5 tests=AWL=0.161 X-Spam-Level: X-Archive-Number: 200904/91 X-Sequence-Number: 32437 Mikel Lindsaar writes: > I'm trying to select a list of names in alphabetical order but > ignoring the whitespace. > So for example, the name "La Combe" should come after "Lace" but > before "Lacs..." FWIW, this would probably happen automatically if you were using a non-C locale. I'm not sure that's really a good solution, because switching to a different locale would affect every sort operation you ever do. But it's an alternative to consider. regards, tom lane