Re: Order By ignoring "-" character

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Dave Wood <postgresql_question(at)attbi(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Order By ignoring "-" character
Date: 2003-06-07 15:58:06
Message-ID: Pine.LNX.4.44.0306071543570.2132-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dave Wood writes:

> If this isn't considered a bug, then could somebody please enlighten me
> as to the proper use of ORDER BY?

Use a different locale.

> In other words, how do I get postgres to order by using a sort typical
> of every text sort I've ever seen? Once that takes case into
> consideration and doesn't pick and choose which characters it will use
> for the sort.

I don't know what sort orders you've seen, but this behavior conforms to
international and national sorting standards. For example, my dictionary
states, "Entries are listed in alphabetical order without taking into
account spaces or hyphens." Anyway, you should find that all characters
and their properties are taken into account, just not with the same
priority. Typically, a collation has four passes (speaking simplified):
letter, accent, case, special characters.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2003-06-07 15:59:52 Re: Special characters in varchar/text fields
Previous Message Henrik Steffen 2003-06-07 15:46:12 Re: update phenomenom