Re: locale & glibc 2.2.2 - Mailing list pgsql-general

From teg@redhat.com (Trond Eivind Glomsrød)
Subject Re: locale & glibc 2.2.2
Date
Msg-id xuyk84gmtw6.fsf@halden.devel.redhat.com
Whole thread Raw
In response to Re: locale & glibc 2.2.2  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> teg@redhat.com (Trond Eivind =?iso-8859-1?q?Glomsr=F8d?=) writes:
> > Of course not, it's not a bug - if this is a problem, it's a bug in
> > Postgresql:
>
> If glibc 2.2.2 sorts that way in C locale, then glibc is broken.
> But I assume you meant this is the behavior in some other locale.

[teg@halden teg]$ LC_COLLATE=C sort foo2.txt
Ad
ac
ae
[teg@halden teg]$

I agree that the above is far from ideal, but this is the traditional
C way. The standard locales (used everywhere, in US en_US is used
which does give you the correct order) don't have this problem, they
sort correctly:

[teg@halden teg]$ LC_COLLATE=en_US sort foo2.txt
ac
Ad
ae
[teg@halden teg]$

--
Trond Eivind Glomsrød
Red Hat, Inc.

pgsql-general by date:

Previous
From: geustace@godzone.net.nz
Date:
Subject: Best practice
Next
From: "Steve Wolfe"
Date:
Subject: Re: Delete w/ regexp