Re: Order changes in PG16 since ICU introduction

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Order changes in PG16 since ICU introduction
Дата
Msg-id 504bc10a9ad8d143f505e66be2a0060e50b45677.camel@j-davis.com
обсуждение исходный текст
Ответ на Re: Order changes in PG16 since ICU introduction  (Alexander Lakhin <exclusion@gmail.com>)
Список pgsql-hackers
On Tue, 2023-05-16 at 19:00 +0300, Alexander Lakhin wrote:
> I'm not sure about the proposed change in icu_from_uchar(). It seems
> that
> len_result + 1 bytes should always be enough for the result string
> terminated
> with NUL. If that's not true (we want to protect from some ICU bug
> here),
> then the change should be backpatched?

I believe it's enough and I'm not aware of any bug there so no backport
is required.

I added checks in places that were (a) checking for U_FAILURE; and (b)
expecting the result to be NUL-terminated. That's mostly callers of
uloc_getLanguage(), where I was not quite paranoid enough.

There were a couple other places though, and I went ahead and added
checks there out of paranoia, too. One was ucnv_fromUChars(), and the
other was uloc_canonicalize().

Regards,
    Jeff Davis




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

Предыдущее
От: Alexander Lakhin
Дата:
Сообщение: Re: Order changes in PG16 since ICU introduction
Следующее
От: "Joel Jacobson"
Дата:
Сообщение: Re: Should CSV parsing be stricter about mid-field quotes?