Re: Consistently use palloc_object() and palloc_array()

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Consistently use palloc_object() and palloc_array()
Дата
Msg-id aSffJWtqfi0ut6NI@paquier.xyz
обсуждение исходный текст
Ответ на Re: Consistently use palloc_object() and palloc_array()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 26, 2025 at 10:25:12PM -0500, Tom Lane wrote:
> Hmm ... I had the same doubts as Michael about whether this change
> could possibly be worth the ensuing back-patching pain.  But if
> it leads to an improvement in type-safety, that'd be a reason to
> take on the work.

Yeah, that sounds like a reason convincing enough to do the jump.  I
didn't really feel strongly against the original proposal to begin
with as it improves the code style, FWIW.

The backpatching bits like these are always annoying, of course.  Now,
these fancy palloc() routines exist since v16 so that would just mean
two years and two branches that would need special handling.  Even
better, why not just backpatch into v15 and v14 the macros in palloc.h
and fe_memutils.h to avoid backpatch hazards due to some new code?
--
Michael

Вложения

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