possible repalloc() in icu_convert_case()

Поиск
Список
Период
Сортировка
От Anton Voloshin
Тема possible repalloc() in icu_convert_case()
Дата
Msg-id f21e4ba9-8db8-91bf-067a-fcacb429ac55@postgrespro.ru
обсуждение исходный текст
Ответы Re: possible repalloc() in icu_convert_case()
Список pgsql-hackers
Hello,

in src/backend/utils/adt/formatting.c, in icu_convert_case() I see:
     if (status == U_BUFFER_OVERFLOW_ERROR)
     {
         /* try again with adjusted length */
         pfree(*buff_dest);
         *buff_dest = palloc(len_dest * sizeof(**buff_dest));
         ...

Is there any reason why this should not be repalloc()?

In case it should be, I've attached a corresponding patch.

-- 
Anton Voloshin
Postgres Professional: https://www.postgrespro.com
Russian Postgres Company

Вложения

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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: ALTER TABLE ADD COLUMN fast default
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: Unused variable found in AttrDefaultFetch