Re: Safer hash table initialization macro - Mailing list pgsql-hackers

From Jelte Fennema-Nio
Subject Re: Safer hash table initialization macro
Date
Msg-id CAGECzQTTQGr9cnqGzEUt3FdROc8PwxXjqBD=ere5YiA2A+PvNw@mail.gmail.com
Whole thread Raw
In response to Re: Safer hash table initialization macro  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-hackers
On Tue, 9 Dec 2025 at 10:11, Thomas Munro <thomas.munro@gmail.com> wrote:
> > What about relying on the existing __builtin_types_compatible_p() instead of
> > _Generic() here?
>
> If we used standard C/C++ it'd work on MSVC too.

And to be clear, that's important because the result of
pg_expr_has_type_p fundamentally impacts the meaning of the code (i.e.
it determines the hash function). Our existing usage of
__builtin_types_compatible_p only adds some *optional* type checking,
so for that it's not critical that it works on MSVC too.



pgsql-hackers by date:

Previous
From: Ajin Cherian
Date:
Subject: Re: Improve pg_sync_replication_slots() to wait for primary to advance
Next
From: Jelte Fennema-Nio
Date:
Subject: Re: Safer hash table initialization macro