pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryan White <nicktook@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: ORDER BY is case insensitive
Date: Tue, 22 Jun 2010 17:40:01 -0400
Message-ID: <8426.1277242801@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTimupyTgU-h-LKkV9VprzFopMMBKqsoO2RVpAzgL@mail.gmail.com>
References: <AANLkTimupyTgU-h-LKkV9VprzFopMMBKqsoO2RVpAzgL@mail.gmail.com>

Bryan White <nicktook@gmail.com> writes:
> I was suprised to find out that ORDER BY is case insensitive.  Is
> there a way to do a case sensitive ORDER BY clause?

Text sort order is determined by the rules of the locale you're using,
specifically the database's LC_COLLATE setting.  Most implementations of
en_US locale use "dictionary" ordering.  You might prefer C locale's
rules instead.

			regards, tom lane



view thread (6+ messages)  latest in thread

Message-ID: <8426.1277242801@sss.pgh.pa.us>
Permalink:  ../8426.1277242801@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/8426.1277242801@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, nicktook@gmail.com
  Subject: Re: ORDER BY is case insensitive
  In-Reply-To: <8426.1277242801@sss.pgh.pa.us>

* 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