aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/btree_gist/btree_cash.c2
-rw-r--r--contrib/btree_gist/btree_int2.c2
-rw-r--r--contrib/btree_gist/btree_int4.c2
-rw-r--r--contrib/btree_gist/btree_int8.c2
-rw-r--r--src/backend/utils/adt/int.c6
-rw-r--r--src/backend/utils/adt/int8.c10
-rw-r--r--src/backend/utils/adt/numeric.c2
7 files changed, 13 insertions, 13 deletions
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c
index 18f45f2750b..894d0a26655 100644
--- a/contrib/btree_gist/btree_cash.c
+++ b/contrib/btree_gist/btree_cash.c
@@ -101,7 +101,7 @@ cash_dist(PG_FUNCTION_ARGS)
Cash ra;
if (pg_sub_s64_overflow(a, b, &r) ||
- r == INT64_MIN)
+ r == PG_INT64_MIN)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("money out of range")));
diff --git a/contrib/btree_gist/btree_int2.c b/contrib/btree_gist/btree_int2.c
index c2af4cd566d..7674e2d292b 100644
--- a/contrib/btree_gist/btree_int2.c
+++ b/contrib/btree_gist/btree_int2.c
@@ -100,7 +100,7 @@ int2_dist(PG_FUNCTION_ARGS)
int16 ra;
if (pg_sub_s16_overflow(a, b, &r) ||
- r == INT16_MIN)
+ r == PG_INT16_MIN)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("smallint out of range")));
diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c
index f2b6dec6607..80005ab65d9 100644
--- a/contrib/btree_gist/btree_int4.c
+++ b/contrib/btree_gist/btree_int4.c
@@ -101,7 +101,7 @@ int4_dist(PG_FUNCTION_ARGS)
int32 ra;
if (pg_sub_s32_overflow(a, b, &r) ||
- r == INT32_MIN)
+ r == PG_INT32_MIN)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("integer out of range")));
diff --git a/contrib/btree_gist/btree_int8.c b/contrib/btree_gist/btree_int8.c
index 16db0028b7a..b0fd3e1277d 100644
--- a/contrib/btree_gist/btree_int8.c
+++ b/contrib/btree_gist/btree_int8.c
@@ -101,7 +101,7 @@ int8_dist(PG_FUNCTION_ARGS)
int64 ra;
if (pg_sub_s64_overflow(a, b, &r) ||
- r == INT64_MIN)
+ r == PG_INT64_MIN)
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
diff --git a/src/backend/utils/adt/int.c b/src/backend/utils/adt/int.c
index 36ba86ca734..d6eb16a907b 100644
--- a/src/backend/utils/adt/int.c
+++ b/src/backend/utils/adt/int.c
@@ -794,7 +794,7 @@ int2div(PG_FUNCTION_ARGS)
*/
if (arg2 == -1)
{
- if (unlikely(arg1 == INT16_MIN))
+ if (unlikely(arg1 == PG_INT16_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("smallint out of range")));
@@ -1018,7 +1018,7 @@ int4abs(PG_FUNCTION_ARGS)
int32 arg1 = PG_GETARG_INT32(0);
int32 result;
- if (unlikely(arg1 == INT32_MIN))
+ if (unlikely(arg1 == PG_INT32_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("integer out of range")));
@@ -1032,7 +1032,7 @@ int2abs(PG_FUNCTION_ARGS)
int16 arg1 = PG_GETARG_INT16(0);
int16 result;
- if (unlikely(arg1 == INT16_MIN))
+ if (unlikely(arg1 == PG_INT16_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("smallint out of range")));
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index bc8dad5c5d8..42bb6ebe2f1 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -103,7 +103,7 @@ scanint8(const char *str, bool errorOK, int64 *result)
if (!neg)
{
- if (unlikely(tmp == INT64_MIN))
+ if (unlikely(tmp == PG_INT64_MIN))
goto out_of_range;
tmp = -tmp;
}
@@ -564,7 +564,7 @@ int8div(PG_FUNCTION_ARGS)
*/
if (arg2 == -1)
{
- if (unlikely(arg1 == INT64_MIN))
+ if (unlikely(arg1 == PG_INT64_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
@@ -588,7 +588,7 @@ int8abs(PG_FUNCTION_ARGS)
int64 arg1 = PG_GETARG_INT64(0);
int64 result;
- if (unlikely(arg1 == INT64_MIN))
+ if (unlikely(arg1 == PG_INT64_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
@@ -822,7 +822,7 @@ int84div(PG_FUNCTION_ARGS)
*/
if (arg2 == -1)
{
- if (unlikely(arg1 == INT64_MIN))
+ if (unlikely(arg1 == PG_INT64_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
@@ -964,7 +964,7 @@ int82div(PG_FUNCTION_ARGS)
*/
if (arg2 == -1)
{
- if (unlikely(arg1 == INT64_MIN))
+ if (unlikely(arg1 == PG_INT64_MIN))
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("bigint out of range")));
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index e9a6ca3535d..98309887015 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -6226,7 +6226,7 @@ numericvar_to_int64(const NumericVar *var, int64 *result)
if (!neg)
{
- if (unlikely(val == INT64_MIN))
+ if (unlikely(val == PG_INT64_MIN))
return false;
val = -val;
}