Re: Order By ignoring "-" character - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: Order By ignoring "-" character
Date
Msg-id Pine.LNX.4.44.0306071543570.2132-100000@peter.localdomain
Whole thread Raw
In response to Order By ignoring "-" character  (Dave Wood <postgresql_question@attbi.com>)
List 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@gmx.net


pgsql-general by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Special characters in varchar/text fields
Next
From: "Henrik Steffen"
Date:
Subject: Re: update phenomenom