From 3522d0eaba5a976f09a48810dd25dff6ab3565df Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Sun, 22 Jul 2018 14:58:01 -0700 Subject: Deduplicate "invalid input syntax" messages for various types. Previously a lot of the error messages referenced the type in the error message itself. That requires that the message is translated separately for each type. Note that currently a few smallint cases continue to reference the integer, rather than smallint, type. A later patch will create a separate routine for 16bit input. Author: Andres Freund Discussion: https://postgr.es/m/20180707200158.wpqkd7rjr4jxq5g7@alap3.anarazel.de --- src/backend/utils/adt/int8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 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 73798e7796..49f32a8b3d 100644 --- a/src/backend/utils/adt/int8.c +++ b/src/backend/utils/adt/int8.c @@ -121,8 +121,8 @@ invalid_syntax: if (!errorOK) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for integer: \"%s\"", - str))); + errmsg("invalid input syntax for type %s: \"%s\"", + "bigint", str))); return false; } -- cgit v1.2.1