Use pg_malloc macros in src/fe_utils

Henrik TJ <henrik@0x48.dk>

From: Henrik TJ <henrik@0x48.dk>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2026-02-18T15:05:09Z
Lists: pgsql-hackers

Attachments

Hi

Inspired by [1], I took a stab at converting src/fe_utils to the new 
pg_malloc macros.

Some mostly useless metrics: 31/34 converted, 7 casts removed.

meson test looks good for me.

1. https://www.postgresql.org/message-id/flat/CAHut%2BPvpGPDLhkHAoxw_g3jdrYxA1m16a8uagbgH3TGWSKtXNQ%40mail.gmail.com


   best regards, Henrik

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Use pg_malloc_object() and pg_alloc_array() variants in frontend code

  2. fe_utils: Sprinkle some pg_malloc_object() and pg_malloc_array()