Re: pgsql: Add standard collation UNICODE

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: pgsql: Add standard collation UNICODE
Дата
Msg-id 0c6fa66f2753217d2a40480a96bd2ccf023536a1.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: pgsql: Add standard collation UNICODE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-committers
On Sat, 2023-03-11 at 15:47 -0500, Tom Lane wrote:
> In general, I see no good reason for our regression tests to be
> making
> assumptions about exactly how ICU's root locale behaves, so I'd
> suggest
> just lobotomizing this test case so it doesn't depend on upper/lower
> sort order.

[ Looks like Peter already found the answer, but I had some additional
commentary so I'll send this anyway. ]

Mystery solved: "und" was not a valid spelling of "root" until version
55. So it fell back to the default locale, which is sensitive to the
environment.

With this in mind, I think we should take the opposite lesson and keep
this test as-is. We don't have to promise the behavior in the docs, but
it did catch a real issue. In fact, it caught a dangerous issue,
because a change to lc_messages could cause a corrupt index.

I'd like to see if there's a way to reliably detect that a fallback to
the environment-sensitive default locale has happened, and throw an
error. I don't think that happens in versions 55 and later, but it
would be nice to have a test because earlier versions of ICU seem
dangerous to me.

Regards,
    Jeff Davis




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Fix JSON error reporting for many cases of erroneous string valu
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: meson: fix openssl detection issues in 6a30027