summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2021-06-27 09:41:16 +0200
committerPeter Eisentraut <peter@eisentraut.org>2021-06-27 09:41:16 +0200
commitc302a6139072fed9410204fa9e751d95930e05ff (patch)
treeb713e14ba1495e581b36a5d593d398107e6fb385 /src/backend/utils/adt
parentdcffc9ba8a1e0ab1b0a57e9b9d38e3dc9960f83f (diff)
Error message refactoring
Take some untranslatable things out of the message and replace by format placeholders, to reduce translatable strings and reduce translation mistakes.
Diffstat (limited to 'src/backend/utils/adt')
-rw-r--r--src/backend/utils/adt/numeric.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index 9525ade1f7c..eb78f0b9c2a 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -4182,11 +4182,11 @@ numeric_int4_opt_error(Numeric num, bool *have_error)
if (NUMERIC_IS_NAN(num))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert NaN to integer")));
+ errmsg("cannot convert NaN to %s", "integer")));
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert infinity to integer")));
+ errmsg("cannot convert infinity to %s", "integer")));
}
}
@@ -4260,11 +4260,11 @@ numeric_int8(PG_FUNCTION_ARGS)
if (NUMERIC_IS_NAN(num))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert NaN to bigint")));
+ errmsg("cannot convert NaN to %s", "bigint")));
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert infinity to bigint")));
+ errmsg("cannot convert infinity to %s", "bigint")));
}
/* Convert to variable format and thence to int8 */
@@ -4301,11 +4301,11 @@ numeric_int2(PG_FUNCTION_ARGS)
if (NUMERIC_IS_NAN(num))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert NaN to smallint")));
+ errmsg("cannot convert NaN to %s", "smallint")));
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert infinity to smallint")));
+ errmsg("cannot convert infinity to %s", "smallint")));
}
/* Convert to variable format and thence to int8 */
@@ -4496,11 +4496,11 @@ numeric_pg_lsn(PG_FUNCTION_ARGS)
if (NUMERIC_IS_NAN(num))
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert NaN to pg_lsn")));
+ errmsg("cannot convert NaN to %s", "pg_lsn")));
else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot convert infinity to pg_lsn")));
+ errmsg("cannot convert infinity to %s", "pg_lsn")));
}
/* Convert to variable format and thence to pg_lsn */