Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 35BEC1336971 for ; Wed, 2 Mar 2011 08:58:11 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 38996-06 for ; Wed, 2 Mar 2011 12:58:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from depesz.com (andy.depesz.com [88.198.47.100]) by mail.postgresql.org (Postfix) with ESMTP id 4A7EC133655C for ; Wed, 2 Mar 2011 08:58:03 -0400 (AST) Received: from andy.depesz.com ([88.198.47.100] helo=depesz.com) by depesz.com with esmtpa (Exim 4.72) (envelope-from ) id 1Pulcw-0001IW-FK for pgsql-bugs@postgresql.org; Wed, 02 Mar 2011 13:58:02 +0100 Date: Wed, 2 Mar 2011 13:58:02 +0100 From: hubert depesz lubaczewski To: pgsql-bugs@postgresql.org Subject: Cannot create collation? Message-ID: <20110302125802.GA2003@depesz.com> Reply-To: depesz@depesz.com MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.21 (2010-09-15) 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: 201103/11 X-Sequence-Number: 29521 hi i'm trying to test collation per column on newest pg head, but I can't seem to get it working. my normal locale is en_US.UTF-8, but in database, for test purposes I used pl_PL.UTF-8. Which works. When I try to create french collation, it seems to work, but fails soon: $ CREATE COLLATION french (LOCALE = 'fr_FR.UTF-8'); CREATE COLLATION $ create table test3 ( x text COLLATE "french" ); CREATE TABLE $ copy test3 from '/tmp/french'; COPY 55 $ select * from test3; x ------------------- d'accord déclassé décolleté décor découpage déjà vu demi-glace demi-sec dénouement de nouveau dérailleur de règle de rigueur dernier cri derrière déshabillé désolé détente de trop diablerie directeur sportif divertissement dossier doyen dressage du jour écarté échappé éclair éclat écorché élan élan vital éminence grise en bloc en escalier en famille enfant terrible en garde ennui en passant en pointe en route entente entrée entremets entre nous entrepreneur escargot escritoire et toi? étude étui excusez-moi extraordinaire (55 rows) $ select * from test3 order by x; ERROR: could not create locale "fr_FR.UTF-8": Success What is wrong in here? In shell, I can do: LC_COLLATE=fr_FR.UTF-8 sort /tmp/french and it works as expected. Best regards, depesz -- The best thing about modern society is how easy it is to avoid contact with it. http://depesz.com/