pgsql: Use correct preprocessor conditional in relptr.h

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use correct preprocessor conditional in relptr.h
Date: 2025-12-13 19:07:43
Message-ID: E1vUUxy-000ZWF-0p@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use correct preprocessor conditional in relptr.h

When relptr.h was added (commit fbc1c12a94a), there was no check for
HAVE_TYPEOF, so it used HAVE__BUILTIN_TYPES_COMPATIBLE_P, which
already existed (commit ea473fb2dee) and which was thought to cover
approximately the same compilers. But the guarded code can also work
without HAVE__BUILTIN_TYPES_COMPATIBLE_P, and we now have a check for
HAVE_TYPEOF (commit 4cb824699e1), so let's fix this up to use the
correct logic.

Co-authored-by: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Discussion: https://www.postgresql.org/message-id/CA%2BhUKGL7trhWiJ4qxpksBztMMTWDyPnP1QN%2BLq341V7QL775DA%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/315342ffedf6b81f629c42e87bfaedbcc7211646

Modified Files
--------------
src/include/utils/relptr.h | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-12-13 21:18:42 pgsql: Fix jsonb_object_agg crash after eliminating null-valued pairs.
Previous Message Christoph Berg 2025-12-13 17:36:07 Re: failed NUMA pages inquiry status: Operation not permitted