Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 4F66792425C for ; Wed, 16 May 2012 19:46:24 -0300 (ADT) Received: from mail-lb0-f174.google.com ([209.85.217.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SUmz5-0008P3-BZ for pgsql-sql@postgresql.org; Wed, 16 May 2012 22:46:23 +0000 Received: by lbbgm6 with SMTP id gm6so897323lbb.19 for ; Wed, 16 May 2012 15:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=MERvHHT83FYdnutWGYJCiA8RJg9aWhflFJioZQzDSCs=; b=dbf+r4V8ouPl3FkI1wYZVoTqDsMU91ib2dV7rYSIrBZ4K+HgFV5zhiWgljOL9w5lJf sq/PnjRTYw5uDecS+dH584vfpFqHnufC8izZ5+6Cx8qjX38s+GhZiM0e/wn/+yt7Q8aP i1ZxsiLr259abPRmC91tucWdAWngJqWHnLqc/dZpQgqz+xoZtS83j28/Q7yx7V+hx6t0 3nOoSVYW71kufkENKu6zTzdMGl51h81mnYqO+R1inOfkoFminKPvZe5bEb4a62jJ8aYC RzVVW4M3a4rWOHCnAlpko8srNkfJyMZt/2sf6mx1nlWIDWcoYoCoBLZw1wFURk1Fb2zu NgHA== MIME-Version: 1.0 Received: by 10.152.148.34 with SMTP id tp2mr4624470lab.47.1337208365555; Wed, 16 May 2012 15:46:05 -0700 (PDT) Received: by 10.112.19.137 with HTTP; Wed, 16 May 2012 15:46:05 -0700 (PDT) In-Reply-To: <23053.1337036410@sss.pgh.pa.us> References: <23053.1337036410@sss.pgh.pa.us> Date: Wed, 16 May 2012 16:46:05 -0600 Message-ID: Subject: Re: order by different on mac vs linux From: Wes James To: Tom Lane Cc: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=e89a8f22c7059e9fbf04c02f15e8 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201205/48 X-Sequence-Number: 36596 --e89a8f22c7059e9fbf04c02f15e8 Content-Type: text/plain; charset=ISO-8859-1 On Mon, May 14, 2012 at 5:00 PM, Tom Lane wrote: > Wes James writes: > > Why is there a different order on the different platforms. > > This is not exactly unusual. You should first check to see if > lc_collate is set differently in the two installations --- but even if > it's the same, there are often platform-specific interpretations of > the sorting rules. (Not to mention that OS X is flat out broken when > it comes to sorting UTF8 data ...) > > I just ran these: linux: on linux # SELECT CASE WHEN 'apache' > '!yada' THEN 'TRUE' ELSE 'FALSE' END FROM pg_user; case ------- FALSE (1 row) # show lc_collate; lc_collate ------------- en_US.UTF-8 (1 row) ------------------------ on mac os x: # SELECT CASE WHEN 'apache' > '!yada' THEN 'TRUE' ELSE 'FALSE' END FROM pg_user; case ------ TRUE (1 row) # show lc_collate; lc_collate ------------- en_US.UTF-8 (1 row) ----------------------- Why is the linux postgres saying false with the lc_collage set the way it is? -wes --e89a8f22c7059e9fbf04c02f15e8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Mon, May 14, 2012 at 5:00 PM, Tom Lan= e <tgl@sss.pgh.pa.us> wrote:
Wes James <comp= tekki@gmail.com> writes:
> Why is there a different order on the different platforms.

This is not exactly unusual. =A0You should first check to see if
lc_collate is set differently in the two installations --- but even if
it's the same, there are often platform-specific interpretations of
the sorting rules. =A0(Not to mention that OS X is flat out broken when
it comes to sorting UTF8 data ...)


= I just ran these:

linux:

on linux

# SELECT CASE WHEN &#= 39;apache' > '!yada' THEN 'TRUE' ELSE 'FALSE'= ; END FROM pg_user;
=A0case
-------
=A0FALSE
(1 row)

# show lc_collate;
=A0lc_colla= te
-------------
=A0en_US.UTF-8=
(1 row)

--------= ----------------

on mac os x:

# SELECT CASE WHEN 'apache' > '!yada' THEN 'TRU= E' ELSE 'FALSE' END FROM pg_user;
=A0case=A0
------
=A0TRUE
(1 row)

# sho= w lc_collate;
=A0lc_collate =A0
-------------
=A0en_US.UTF-8
(1 row)=A0


-----------------= ------

Why is the linux postgres saying false with= the lc_collage set the way it is?

-wes
--e89a8f22c7059e9fbf04c02f15e8--