pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: silly sad <sad@bankir.ru>
To: pgsql-sql@postgresql.org
Subject: Re: ORDER BY is case insensitive
Date: Thu, 24 Jun 2010 08:49:55 +0400
Message-ID: <4C22E3F3.6040506@bankir.ru> (raw)
In-Reply-To: <hvt35i$p4j$1@reversiblemaps.ath.cx>
References: <AANLkTimupyTgU-h-LKkV9VprzFopMMBKqsoO2RVpAzgL@mail.gmail.com>
	<hvt35i$p4j$1@reversiblemaps.ath.cx>

On 06/23/10 17:45, Jasen Betts wrote:
> On 2010-06-22, Bryan White<nicktook@gmail.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.



view thread (6+ messages)  latest in thread

Message-ID: <4C22E3F3.6040506@bankir.ru>
Permalink:  ../4C22E3F3.6040506@bankir.ru/
Also on:    postgresql.org/message-id/4C22E3F3.6040506@bankir.ru

 · 

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: sad@bankir.ru
  Subject: Re: ORDER BY is case insensitive
  In-Reply-To: <4C22E3F3.6040506@bankir.ru>

* 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