Re: data order problem - Mailing list pgsql-sql

From Josh Berkus
Subject Re: data order problem
Date
Msg-id web-1370650@davinci.ethosmedia.com
Whole thread Raw
In response to Re: data order problem  ("jack" <datactrl@tpg.com.au>)
Responses MAX(column1),MAX(column2),...  (Bjarte Aagnes <bjartea@student.sv.uio.no>)
List pgsql-sql
Jack,

> Suppose '_' stands for a space character. The one column table,xxx,
> contains
> following data.
> column name is suburb and is set as primary key.
> 
> 'THE_AAA'
> 'THE_BBB'
> 'THE_CDD'
> 'THECCC'
> 
> After I do
> "SELECT * FROM xxx ORDER BY suburb;"
> I've got this.
> 
> 'THE_AAA'
> 'THE_BBB'
> 'THECCC'
> 'THE_CDD'
> 
> But I expect it should be like ...
> 'THE_AAA'
> 'THE_BBB'
> 'THE_CDD'
> 'THECCC'
> 
> Because, according to ascii code, space character should be smaller
> than 'C'

It is.  I'm afraid that you compiled your database with some kind of
non-standard sort order, possibly due to the OS you are using.  I can't
help you with this; I'm just a SQL junkie.  Good luck!

-Josh


pgsql-sql by date:

Previous
From: Roberto Mello
Date:
Subject: Re: Thank you ! Re: Is there any Faster workaround ??
Next
From: Edipo Elder Fernandes de Melo
Date:
Subject: Large or Small tables?