Hi, On 2014-05-25 09:17:24 +0200, Fabien COELHO wrote: > sql> CREATE COLLATION "french" (locale='fr_FR.utf8'); > ERROR: could not create locale "fr_FR.utf8": Success > > The collation creation fails, not sure why yet. However, the "error .. > success" message is especially unhelpful.
This seems to be a glibc bug. If a nonexistant locale has already been asked for errno is set to 0 instead of something sensible. Using a debugger it's possible to see that in an earlier setlocale() call errno is set correctly, but newlocale() then fails without setting errno. The culprit seems to be some caching in glibc's _nl_find_locale(). I am not entirely sure why it's not reliably triggered < 9.4. Searching for that error turned up: https://sourceware.org/bugzilla/show_bug.cgi?id=14247 https://bugzilla.redhat.com/show_bug.cgi?id=827510 The latter by Tom Lane ;). Unfortunately not much seems to have happened since. Except badgering the glibc guys a bit, the only thing I can think of is to fudge errno = 0 into errno = ENOENT. Not nice. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers