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

From Stephan Szabo
Subject Re: order by question.
Date
Msg-id 20070504123545.B20709@megazone.bigpanda.com
Whole thread Raw
In response to Re: order by question.  ("Jose Blanco" <blancoj@umich.edu>)
Responses Re: order by question.  ("Jose Blanco" <blancoj@umich.edu>)
List pgsql-bugs
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: Peter Eisentraut
Date:
Subject: Re: order by question.
Next
From: "Jose Blanco"
Date:
Subject: Re: order by question.