On sön, 2011-09-04 at 10:47 -0400, Andrew Dunstan wrote:
> Well, I don't think we are obliged to cater for locales that break ASCII 
> ordering.

We do cater for that.  See

commit 8cd375526790c5be8ae24c77f13ac446adda88b6
Author: Peter Eisentraut <pete...@gmx.net>
Date:   Mon Mar 9 15:04:21 2009 +0000

    Tweak the regression test case so that the ordering of numbers vs. letters
    doesn't matter.  This fixes failures in the Czech locale.

commit 71936fc5eb6330ace4205163b3d2f731a7db5a41
Author: Peter Eisentraut <pete...@gmx.net>
Date:   Thu Feb 12 15:11:44 2009 +0000

    The Czech (cs_CZ) and Slovak (sk_SK) locales sort numbers after letters,
    instead of vice versa.  Update the regression test expectations to support
    that.  In the plpgsql test, adjust the test data so that this isn't an
    issue.  In the char and varchar tests, add new expected files.

and more generally

commit 8987c115f1e7256b17c1cd04a8471810185d1941
Author: Peter Eisentraut <pete...@gmx.net>
Date:   Mon Jan 19 13:38:47 2009 +0000

    Alter regression test cases that rely on the sort order of "aa".  Some
    locales (da_DK, fo_FO, kl_GL, nb_NO, nn_NO in glibc) sort "aa" after "z".

commit 2b01cbe34042ed9fdea38a0c2fad5ab81df032c9
Author: Peter Eisentraut <pete...@gmx.net>
Date:   Mon Jan 19 12:02:29 2009 +0000

    Alter the regression test cases that rely on the sort order of "ch" between
    "cg" and "ci".  This eliminates a test failure on the following glibc
    locales: br_FR, cs_CZ, cy_GB, es_EC, es_US, hsb_DE, ig_NG, ik_CA, sk_SK.

commit a5d67a0a050a9d32c351183992c3f08631735c37
Author: Peter Eisentraut <pete...@gmx.net>
Date:   Sun Jan 11 09:41:45 2009 +0000

    Make tests pass with or without locale.

> And to answer Pavel's question in email to me (maybe he meant to hit 
> reply-all instead of reply):
> 
> > This order is based on czech locale, but regress tests should be
> > independent on locale?
> >
> 
> No, it's not really possible. Something has to determine sort order.

Well, if the going gets tough, we could stick a COLLATE "C" here and
there.  But as you can see above, this case should work.  If something
broke it, let's fix it.



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to