Re: Safer hash table initialization macro

Jelte Fennema <postgres@jeltef.nl>

From: "Jelte Fennema-Nio" <postgres@jeltef.nl>
To: "Chao Li" <li.evan.chao@gmail.com>
Cc: "Bertrand Drouvot" <bertranddrouvot.pg@gmail.com>, "Thomas Munro" <thomas.munro@gmail.com>, <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-14T13:48:58Z
Lists: pgsql-hackers

Attachments

On Tue Jan 27, 2026 at 7:10 PM CET, Jelte Fennema-Nio wrote:
> Good suggestion. Done.

Newly attached version that fixes a rebase conclict. Including a few
small additions:

1. Use foreach_hash in async.c (in recently introduced code from
   282b1cde9ded)
2. Reference foreach_hash in code comments instead of hash_seq_search
3. Add a note about the reason for the double for loop in foreach_hash
   macro code comment (same comment as for foreach_internal in
   pg_list.h)