Re: ORDER BY is case insensitive

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bryan White <nicktook(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: ORDER BY is case insensitive
Date: 2010-06-22 21:40:01
Message-ID: 8426.1277242801@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bryan White <nicktook(at)gmail(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message silly sad 2010-06-23 06:11:04 Re: How to Insert and retrieve multilingual (Hindi "an Indian language") into PostgreSQL
Previous Message Gerardo Herzig 2010-06-22 21:32:08 Re: ORDER BY is case insensitive