From: Tom Lane <tgl@sss.pgh.pa.us>
To: Martin Pitt <mpitt@debian.org>
Cc: pgsql-bugs@postgresql.org
Subject: Re: 9.1beta1 "collate" test failure
Date: Tue, 10 May 2011 11:38:32 -0400
Message-ID: <17343.1305041912@sss.pgh.pa.us> (raw)
In-Reply-To: <20110510145841.GN2490@piware.de>
References: <20110510123618.GK2490@piware.de>
<16249.1305036199@sss.pgh.pa.us>
<20110510145841.GN2490@piware.de>
Martin Pitt <mpitt@debian.org> writes:
> Tom Lane [2011-05-10 10:03 -0400]:
>> [ raised eyebrow... ] What platform? This seems to point towards "C"
>> locale not doing what it is supposed to ...
> After your comment I checked locales on my system, and for some reason
> I had an /usr/lib/locales/C.UTF-8/ besides the usual locale-archive. I
> cleaned this up, and it works now.
Hmm ... I think that's probably still a bug, actually. Apparently what
happened is that initdb injected an entry for "C" with encoding UTF8
into pg_collation, and then that was used instead of the intended
"all-encodings" C entry, and then since the actual LC_COLLATE string
wasn't precisely "C" we didn't go down the strcmp() code path but used
whatever the locale file said to do ... which evidently wasn't really
"C" behavior.
We probably need to tweak initdb to be real sure it won't add entries
that conflict with the built-in ones. This is already prohibited by
CREATE COLLATION but initdb has to bypass that check.
Thanks for the report!
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, mpitt@debian.org
Subject: Re: 9.1beta1 "collate" test failure
In-Reply-To: <17343.1305041912@sss.pgh.pa.us>
References: <20110510123618.GK2490@piware.de> <16249.1305036199@sss.pgh.pa.us> <20110510145841.GN2490@piware.de> <17343.1305041912@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox