> regression=# SELECT * from test order by ascii(data);
That is what I was looking for. Thanks to all.
--
Bryan White
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On 06/23/10 17:45, Jasen Betts wrote:
On 2010-06-22, Bryan White 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'')::b
On 2010-06-22, Bryan White 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.
> This transcript demonstrates what I am seeing:
>
> bryan=# select * from t order by f;
> f
> ---
> a
>
Bryan White 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 local
Bryan White 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?
>
> This transcript demonstrates what I am seeing:
>
> $ createdb bryan
> $ psql bryan
> psql (8.4.4)
> Type "help" for help.
>
> bryan=# create table t (f
I was suprised to find out that ORDER BY is case insensitive. Is
there a way to do a case sensitive ORDER BY clause?
This transcript demonstrates what I am seeing:
$ createdb bryan
$ psql bryan
psql (8.4.4)
Type "help" for help.
bryan=# create table t (f text);
CREATE TABLE
bryan=# insert into