Thread

  1. Re: Safer hash table initialization macro

    Jelte Fennema-Nio <postgres@jeltef.nl> — 2025-12-09T10:43:01Z

    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.