Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 873141337990 for ; Tue, 10 May 2011 12:38:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 46963-07 for ; Tue, 10 May 2011 15:38:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id C7D191337B4E for ; Tue, 10 May 2011 12:38:34 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4AFcW1H017344; Tue, 10 May 2011 11:38:32 -0400 (EDT) To: Martin Pitt cc: pgsql-bugs@postgresql.org Subject: Re: 9.1beta1 "collate" test failure In-reply-to: <20110510145841.GN2490@piware.de> References: <20110510123618.GK2490@piware.de> <16249.1305036199@sss.pgh.pa.us> <20110510145841.GN2490@piware.de> Comments: In-reply-to Martin Pitt message dated "Tue, 10 May 2011 16:58:41 +0200" Date: Tue, 10 May 2011 11:38:32 -0400 Message-ID: <17343.1305041912@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/69 X-Sequence-Number: 30208 Martin Pitt 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