]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Remove obsolete SAMESIGN macro
authorRichard Guo <rguo@postgresql.org>
Wed, 4 Mar 2026 01:56:06 +0000 (10:56 +0900)
committerRichard Guo <rguo@postgresql.org>
Wed, 4 Mar 2026 01:56:06 +0000 (10:56 +0900)
The SAMESIGN macro was historically used as a helper for manual
integer overflow checks.  However, since commit 4d6ad3125 introduced
overflow-aware integer operations, this manual sign-checking logic is
no longer necessary.

The macro remains defined in brin_minmax_multi.c and timestamp.c, but
is not used in either file.  This patch removes these definitions to
clean things up.

Author: Richard Guo <guofenglinux@gmail.com>
Discussion: https://postgr.es/m/CAMbWs4-NL3J3hQ3LzrwV-YUkQC18P+jM7ZiegQyAHzgdZev2qg@mail.gmail.com

src/backend/access/brin/brin_minmax_multi.c
src/backend/utils/adt/timestamp.c

index 1434c1f938a86f634d6d088f5cb0fb61f7990fe4..207ae336091b38a9e484c3108b13cf1d94ea3bad 100644 (file)
@@ -131,8 +131,6 @@ typedef struct MinMaxMultiOptions
                 ((MinMaxMultiOptions *) (opts))->valuesPerRange : \
                 MINMAX_MULTI_DEFAULT_VALUES_PER_PAGE)
 
-#define SAMESIGN(a,b) (((a) < 0) == ((b) < 0))
-
 /*
  * The summary of minmax-multi indexes has two representations - Ranges for
  * convenient processing, and SerializedRanges for storage in bytea value.
index e2603183f1c084045ee633b58087904c6ea131fa..6f8cf29c9105c1c0f6bf62c3ec0498a2358c492c 100644 (file)
@@ -48,8 +48,6 @@
 #error -ffast-math is known to break this code
 #endif
 
-#define SAMESIGN(a,b)  (((a) < 0) == ((b) < 0))
-
 /* Set at postmaster start */
 TimestampTz PgStartTime;