Re: Remove traces of long in dynahash.c

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Michael Paquier <michael@paquier.xyz>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-08-19T21:01:49Z
Lists: pgsql-hackers
On 19.08.25 08:24, Michael Paquier wrote:
> While looking at the recent business with dynahash.c in [1], I have
> been reminded of the fact that this code still depends on long.

It's definitely a good idea to get rid of "long" usage.  But you can 
also replace it with long long instead of int64.  I suppose this is a 
stylistic question, but I would tend to use the intNN types only when I 
need exactly that many bits.

Also, your patch changes from signed to unsigned types.  Maybe that's 
ok, but you didn't explain it.




Commits

  1. Remove dynahash.h

  2. Replace callers of dynahash.h's my_log() by equivalent in pg_bitutils.h

  3. Change dynahash.c and hsearch.h to use int64 instead of long