Re: pg9.4b1: unhelpful error message when creating a collation

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg9.4b1: unhelpful error message when creating a collation
Дата
Msg-id 12267.1401041366@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg9.4b1: unhelpful error message when creating a collation  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
Andres Freund <andres@2ndquadrant.com> writes:
> 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

> 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.
> 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.

Yeah.  Red Hat seems to be carrying a patch (the RH bugzilla says it
was fixed in Fedora 17, and I see correct behavior in current RHEL6)
but if the sourceware bug reflects the state of affairs upstream then
other distros may still be suffering from the bug.

> Except badgering the glibc guys a bit, the only thing I can think of is
> to fudge errno = 0 into errno = ENOENT. Not nice.

Yeah, I don't especially care for adding such a workaround.  If the
consequences were worse than a wrong error message, then maybe ---
but adding the workaround might itself sometimes mean a wrong error
message, so it's not clear we'd be making much forward progress.

Better to pester the glibc boys to fix it properly.  In the meantime,
you might have some luck asking the Ubuntu packagers to copy Red Hat's
fix.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: pg_upgrade fails: Mismatch of relation OID in database 8.4 -> 9.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [9.5] possible fast path for pinning a page multiple times