Re: order by question.

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Jose Blanco <blancoj(at)umich(dot)edu>
Cc: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: order by question.
Date: 2007-05-04 19:38:09
Message-ID: 20070504123545.B20709@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.".

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stephen Frost 2007-05-04 19:41:45 Re: Removing pg_auth_members.grantor (was Grantor name gets lost when grantor role dropped)
Previous Message Peter Eisentraut 2007-05-04 19:26:00 Re: order by question.