Re: ORDER BY is case insensitive

From: silly sad <sad(at)bankir(dot)ru>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: ORDER BY is case insensitive
Date: 2010-06-24 04:49:55
Message-ID: 4C22E3F3.6040506@bankir.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 06/23/10 17:45, Jasen Betts wrote:
> On 2010-06-22, Bryan White<nicktook(at)gmail(dot)com> wrote:
>> I was suprised to find out that ORDER BY is case insensitive. Is
>> there a way to do a case sensitive ORDER BY clause?
>
> use bytea instead of a text type.
>
> try this:
>
> select * from t order by replace(f,e'\\', e'\\\\')::bytea
>
> you may want to index on replace(f,e'\\', e'\\\\')::bytea

certainly wrong way.
keyword is "multibyte chars".

as he asked about case sensitivity, i presume he still want to preserve
alphabet order -- u propose to cancel alphabet order at all.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Joshua Gooding 2010-06-24 13:05:11 question about partitioning
Previous Message bruno.scovoli 2010-06-23 21:01:35 Re: COPY command and required file permissions