Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id DDC9364FD0B for ; Wed, 20 Aug 2008 17:31:41 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 43810-04 for ; Wed, 20 Aug 2008 17:31:36 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.224]) by postgresql.org (Postfix) with ESMTP id C5A9E64FD16 for ; Wed, 20 Aug 2008 17:31:38 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so994312rvf.43 for ; Wed, 20 Aug 2008 13:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=6/fH6Tj89XujlT982fEI6zgIsDgHLQQTO0DczjPPQMM=; b=oXACHYk81sdll9STBGUR9wBYCV6dpCwHBKGljblhMq0mmfsR4h2MAkNdD4n88A56b9 LpyZwNZ81nryGbjLLk+y2iGZ7DZ8S6ELddwIWBEFJNly4hiS9c9cMsppqiabewL8i0rE 3NkAFYko7ubnWQTRrM/kU8G+rKKPsXmgBQ1TM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ij858nrYxtYzBhOT9QSwnwYkrUvtxKmplFGvDaYFmRFFH2OSH1t+KuvMhqIwFXtU+I U+tQAfch4KSjoVuQe6KnH9oC8r3qFu/HgaiMSRaXa+jlU6B9kMDcqbPVnfvhxhcDdYAI R5hn2g/uvhX29ntzgeqr2KeI3BTCUMjKQl0B8= Received: by 10.140.165.21 with SMTP id n21mr300367rve.244.1219264297510; Wed, 20 Aug 2008 13:31:37 -0700 (PDT) Received: by 10.141.197.1 with HTTP; Wed, 20 Aug 2008 13:31:37 -0700 (PDT) Message-ID: Date: Wed, 20 Aug 2008 14:31:37 -0600 From: "Scott Marlowe" To: "Blanco, Jose" Subject: Re: Ordering not acting right. Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200808/91 X-Sequence-Number: 29936 On Wed, Aug 20, 2008 at 1:48 PM, Blanco, Jose wrote: > I have a text field which I use to store names ( lastname, firstname ) > and suppose we have the following 3 authors in the field: > ta, a > ta, z > tab, a > > I would expect them to show up in the order shown above when I select > this field and order it by it, but instead I get: > > ta, a > tab, a > ta, z > > Some one has suggested that this may have to do with my locale setting. > I'm not an administrator so I'm not sure what how to check for the > locale setting or what to change it to. Does any one have any > suggestions? > > I'm using postgres 8.1.11. The best fix if you want ascii ordering is to re-initdb your db with locale=C and then reload your data. There's some stuff you can do with varchar_pattern_ops, but I'm not sure it will work for order by in your situation.