Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id C3940133616B for ; Wed, 2 Mar 2011 15:59:55 -0400 (AST) 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 94064-02 for ; Wed, 2 Mar 2011 19:59:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by mail.postgresql.org (Postfix) with SMTP id B17921337BD7 for ; Wed, 2 Mar 2011 15:59:47 -0400 (AST) Received: (qmail invoked by alias); 02 Mar 2011 19:59:44 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp013) with SMTP; 02 Mar 2011 20:59:44 +0100 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1/pg+M3T7npl3drbMCRXhOOAU2aJz3rVgNd5MFYAg EoRPTSmO38QO2w Subject: Re: Cannot create collation? From: Peter Eisentraut To: Heikki Linnakangas Cc: depesz@depesz.com, pgsql-bugs@postgresql.org In-Reply-To: <4D6E69AD.7080103@enterprisedb.com> References: <20110302125802.GA2003@depesz.com> <4D6E69AD.7080103@enterprisedb.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 02 Mar 2011 21:59:43 +0200 Message-ID: <1299095983.21461.11.camel@vanquo.pezone.net> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/15 X-Sequence-Number: 29525 On ons, 2011-03-02 at 18:00 +0200, Heikki Linnakangas wrote: > Hmm, regardless of what's causing this, I wonder if we should check > that the locale works at CREATE COLLATION time, rather than fail when > you try to use it. Ie. add a call to pg_newlocale_from_collation() at > the end of DefineCollation(). Yeah, I was apparently hoping that check_encoding_locale_matches() would catch invalid locales, but it doesn't, so we should put in an explicit check.