Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 136581337BC9 for ; Fri, 4 Mar 2011 16:16:43 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 07287-01 for ; Fri, 4 Mar 2011 20:16:35 +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 936151337BD0 for ; Fri, 4 Mar 2011 16:16:34 -0400 (AST) Received: (qmail invoked by alias); 04 Mar 2011 20:16:28 -0000 Received: from a88-115-218-165.elisa-laajakaista.fi (EHLO [10.0.0.101]) [88.115.218.165] by mail.gmx.net (mp047) with SMTP; 04 Mar 2011 21:16:28 +0100 X-Authenticated: #495269 X-Provags-ID: V01U2FsdGVkX1+b4T4gKw6bDUO/aeGu553G6VL+vnLgUMBB7zD6Jr z5goiUA0yqqFG1 Subject: Re: Cannot create collation? From: Peter Eisentraut To: Heikki Linnakangas Cc: depesz@depesz.com, pgsql-bugs@postgresql.org In-Reply-To: <1299095983.21461.11.camel@vanquo.pezone.net> References: <20110302125802.GA2003@depesz.com> <4D6E69AD.7080103@enterprisedb.com> <1299095983.21461.11.camel@vanquo.pezone.net> Content-Type: text/plain; charset="UTF-8" Date: Fri, 04 Mar 2011 22:16:26 +0200 Message-ID: <1299269786.27815.4.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/108 X-Sequence-Number: 29618 On ons, 2011-03-02 at 21:59 +0200, Peter Eisentraut wrote: > 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. Fixed.