pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Kristian Jörg <krjg@devo.se>
To: pgsql-sql@postgresql.org
Subject: Re: Sort order with spaces?
Date: Wed, 17 Sep 2003 11:44:02 +0100
Message-ID: <200309171144.02871.dev@archonet.com> (raw)
In-Reply-To: <3F682DB3.6080905@devo.se>
References: <3F682DB3.6080905@devo.se>

On Wednesday 17 September 2003 10:47, Kristian Jörg wrote:
> Hello!
>
> I am having troubles with sort order in Postgres. It seems that space is
> not handled at all?
> For instance the following rows are sorted in MS SQL Server as:
>
> LUNDGREN
> M L R
> MACDOWELL
> MUSCLE
>
> But in Postgres I get this order:
>
> LUNDGREN
> MACDOWELL
> M L R
> MUSCLE

Sort order depends upon your locale settings (specifically LC_COLLATE), which 
will have been set when you ran "initdb". Basically, sort orders for C , 
en_GB and fr will all be different. I'm guessing you expect "C" style 
sorting.

Check the end of your postgresql.conf file to see what settings you currently 
have.
See the manuals (Localization section) and list archives for plenty of 
details.
-- 
  Richard Huxton
  Archonet Ltd



view thread (8+ messages)  latest in thread

Message-ID: <200309171144.02871.dev@archonet.com>
Permalink:  ../200309171144.02871.dev@archonet.com/
Also on:    postgresql.org/message-id/200309171144.02871.dev@archonet.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: dev@archonet.com, krjg@devo.se
  Subject: Re: Sort order with spaces?
  In-Reply-To: <200309171144.02871.dev@archonet.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