pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Wes James <comptekki@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: order by different on mac vs linux
Date: Wed, 16 May 2012 16:46:05 -0600
Message-ID: <CAFjCMHv2ACO-+V0EDz0D5UUbVJOGbmZh6ou7+vqK3WH4Wra24Q@mail.gmail.com> (raw)
In-Reply-To: <23053.1337036410@sss.pgh.pa.us>
References: <CAFjCMHse4AHdTav96ifSsKaqq1Ggj43Xc=DPBfwCzZyuYKAJFQ@mail.gmail.com>
	<23053.1337036410@sss.pgh.pa.us>

On Mon, May 14, 2012 at 5:00 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> Wes James <comptekki@gmail.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

view thread (16+ messages)  latest in thread

Message-ID: <CAFjCMHv2ACO-+V0EDz0D5UUbVJOGbmZh6ou7+vqK3WH4Wra24Q@mail.gmail.com>
Permalink:  ../CAFjCMHv2ACO-+V0EDz0D5UUbVJOGbmZh6ou7+vqK3WH4Wra24Q@mail.gmail.com/
Also on:    postgresql.org/message-id/CAFjCMHv2ACO-+V0EDz0D5UUbVJOGbmZh6ou7+vqK3WH4Wra24Q@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: comptekki@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: order by different on mac vs linux
  In-Reply-To: <CAFjCMHv2ACO-+V0EDz0D5UUbVJOGbmZh6ou7+vqK3WH4Wra24Q@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox