Re: Safer hash table initialization macro

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Chao Li" <li(dot)evan(dot)chao(at)gmail(dot)com>
Cc: "Bertrand Drouvot" <bertranddrouvot(dot)pg(at)gmail(dot)com>, "Thomas Munro" <thomas(dot)munro(at)gmail(dot)com>, <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Safer hash table initialization macro
Date: 2026-03-14 13:48:58
Message-ID: DH2JWULUT35M.30495YAOMRR56@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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)

Attachment Content-Type Size
v11-0001-Add-hash_make-macros.patch text/x-patch 15.8 KB
v11-0002-Add-foreach_hash-macro.patch text/x-patch 3.9 KB
v11-0003-Use-hash_make-macros-throughout-the-codebase.patch text/x-patch 96.3 KB
v11-0004-Use-foreach_hash-macro-throughout-the-codebase.patch text/x-patch 77.0 KB
v11-0005-Inline-functions-that-have-now-become-trivial.patch text/x-patch 4.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2026-03-14 14:03:20 Re: RFC: adding pytest as a supported test framework
Previous Message Jelte Fennema-Nio 2026-03-14 13:41:08 Re: Change copyObject() to use typeof_unqual