Re: order by query wrong result

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Silvio Brandani <silvio(dot)brandani(at)tech(dot)sdb(dot)it>
Cc: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: order by query wrong result
Date: 2014-11-19 16:10:26
Message-ID: 27275.1416413426@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Silvio Brandani <silvio(dot)brandani(at)tech(dot)sdb(dot)it> writes:
> Hi,
> lc_collate
> -------------
> en_US.UTF-8

en_US (and, in fact, most Linux locales other than C) uses "dictionary
order", which ignores pretty much everything except letters in its
first-pass comparison.

You can check that it's not just Postgres being weird by feeding the
same data through sort(1) after setting LC_COLLATE this way in its
environment. You'll get the same results.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Silvio Brandani 2014-11-19 16:36:53 Re: order by query wrong result
Previous Message Silvio Brandani 2014-11-19 15:57:37 Re: order by query wrong result