Re: data order problem

From: "Josh Berkus" <josh(at)agliodbs(dot)com>
To: "jack" <datactrl(at)tpg(dot)com(dot)au>, <pgsql-sql(at)postgresql(dot)org>, "Josh Berkus" <josh(at)agliodbs(dot)com>
Subject: Re: data order problem
Date: 2002-04-15 15:46:46
Message-ID: web-1370650@davinci.ethosmedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Josh Berkus 2002-04-15 15:51:43 Re: Date format
Previous Message P. Jourdan 2002-04-15 14:41:39 Re: Problem in postgresql installation

Browse pgsql-sql by date

  From Date Subject
Next Message Edipo Elder Fernandes de Melo 2002-04-15 17:38:05 Large or Small tables?
Previous Message Roberto Mello 2002-04-15 15:23:29 Re: Thank you ! Re: Is there any Faster workaround ??