Re: order by question. - Mailing list pgsql-bugs

From Jose Blanco
Subject Re: order by question.
Date
Msg-id 20070504194342.B234C9FBE0C@postgresql.org
Whole thread Raw
In response to Re: order by question.  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: order by question.  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-bugs
I'm not sure what you mean by "C" and how do I change this?

-----Original Message-----
From: Stephan Szabo [mailto:sszabo@megazone.bigpanda.com]
Sent: Friday, May 04, 2007 3:38 PM
To: Jose Blanco
Cc: 'Tom Lane'; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] order by question.


On Fri, 4 May 2007, Jose Blanco wrote:

> This second time I did, see
>
> select author, sort_author from itemsbyauthor where sort_author like
'tan%'
> order by 2;
>
>
> "order by 2"
>
> Or am I not understanding something?

One issue you might not realize is that the sort order for some locales
ignore symbols and spaces for initial scans, so for example, you might
find that "A Z" > "AB" while " " < "B". Specifically, for the data you
gave, en_US would order them "tan, fang", "tang, s. c.", "tan, weihong"
while C would order them "tan, fang", "tan, weihong", "tang, s. c.".

pgsql-bugs by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: order by question.
Next
From: Stephen Frost
Date:
Subject: Re: Removing pg_auth_members.grantor (was Grantor name gets lost when grantor role dropped)