Skip site navigation (1) Skip section navigation (2)

Re: order by different on mac vs linux

From: Wes James <comptekki(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: order by different on mac vs linux
Date: 2012-05-16 22:46:05
Message-ID: CAFjCMHv2ACO-+V0EDz0D5UUbVJOGbmZh6ou7+vqK3WH4Wra24Q@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
On Mon, May 14, 2012 at 5:00 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Wes James <comptekki(at)gmail(dot)com> 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

In response to

Responses

pgsql-sql by date

Next:From: Samuel GendlerDate: 2012-05-16 23:00:31
Subject: Re: order by different on mac vs linux
Previous:From: Jan BakuwelDate: 2012-05-15 23:30:34
Subject: Re: SELECT 1st field

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group