Re: Va: Va: [BUGS] Bug #519: Bug in order b y clausule

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Sandor Vig <sandor(dot)vig(at)audi(dot)hu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Va: Va: [BUGS] Bug #519: Bug in order b y clausule
Date: 2001-11-27 16:09:16
Message-ID: 20011127074431.W20315-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 27 Nov 2001, Sandor Vig wrote:

>
> > This doesn't seem to entirely square with the results you two get,
> > but it sure does look like "CS" sorts in non-ASCII order in HU locale.
>
> I've tried to understand the "bug" and I think I have something for you:
>
> The Hungarian ABC (traditional old style) looks like:
> A,A',B,C,CS,D,E,E',F,G.......Q,R,S,T,TY,....
> (Yes, there are members with two characters!)
> This is how we learned it in the elementary school... But nowdays
> mainly the computers don't care about the two character members
> of our ABC this means, that there is no "CS","TY","DZ","DZS" etc...
> only "C" and "T" and so on...
>
> But let's say that the Red Hat uses the old style locale sort order,
> but int this case should the "CS" after the "C" standing, and the
> "TY" after the "T".

Actually I think CS would be after C* for any C? that doesn't have
a separate collation order since the additional characters don't
matter. C<CS, CS<D: CT would be less than CS since C<CS, etc...
which would explain
CA
..
CY
CS
CZ
D
If CZ also has a special collation value (greater than CS presumably
but also less that D?) Otherwise I'd expect
CY
CZ
CS
D

> So, it is still a mystery for me....
You probably need the locale for sorting the single character letters
but you don't want the collation values of the multiple character ones.
I think you're probably going to need to get an alternate locale
file but I'm not sure what's involved in that outside of postgres.
For postgres you'd need to dump, initdb under the new locale and restore
probably.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Vicktor 2001-11-28 10:24:29 text(bool), text(numeric)
Previous Message TONY J.Y. 2001-11-27 15:39:01 Bug report.