Preferred use of macro GetPGProcByNumber

Maksim.Melnikov <m.melnikov@postgrespro.ru>

From: "Maksim.Melnikov" <m.melnikov@postgrespro.ru>
To: pgsql-hackers@lists.postgresql.org
Date: 2025-09-12T12:39:09Z
Lists: pgsql-hackers

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 the GetPGProcByNumber() macro when possible

Attachments

Hello hackers,
I've noticed some places where elements of ProcGlobal->allProcs are 
addressed directly via arr index.
But in proc.h macros GetPGProcByNumber exist, that was added to get proc 
objects by index,
so I suggest minor refactoring 'ProcGlobal->allProcs[index]' -> 
'GetPGProcByNumber(index)'.
Please, see attached patch, branched from rev 6ede13d1b5f.

Best regards
Melnikov Maksim