From 9a34123bc315e55b33038464422ef1cd2b67dab2 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 18 Jan 2017 16:08:20 -0300 Subject: Make messages mentioning type names more uniform This avoids additional translatable strings for each distinct type, as well as making our quoting style around type names more consistent (namely, that we don't quote type names). This continues what started as f402b9950120. Discussion: https://postgr.es/m/20160401170642.GA57509@alvherre.pgsql --- src/backend/utils/adt/int8.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/backend/utils/adt/int8.c') diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c index b7aa0ad8832..0c6a412f2aa 100644 --- a/src/backend/utils/adt/int8.c +++ b/src/backend/utils/adt/int8.c @@ -95,8 +95,8 @@ scanint8(const char *str, bool errorOK, int64 *result) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for integer: \"%s\"", - str))); + errmsg("invalid input syntax for %s: \"%s\"", + "integer", str))); } /* process digits */ @@ -111,8 +111,8 @@ scanint8(const char *str, bool errorOK, int64 *result) else ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("value \"%s\" is out of range for type bigint", - str))); + errmsg("value \"%s\" is out of range for type %s", + str, "bigint"))); } tmp = newtmp; } @@ -130,8 +130,8 @@ gotdigits: else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for integer: \"%s\"", - str))); + errmsg("invalid input syntax for %s: \"%s\"", + "integer", str))); } *result = (sign < 0) ? -tmp : tmp; -- cgit v1.2.3