1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

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 f402b99501.

Discussion: https://postgr.es/m/20160401170642.GA57509@alvherre.pgsql
This commit is contained in:
Alvaro Herrera
2017-01-18 16:08:20 -03:00
parent 716c7d4b24
commit 9a34123bc3
26 changed files with 155 additions and 129 deletions

View File

@ -241,8 +241,8 @@ float4in(PG_FUNCTION_ARGS)
if (*num == '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type real: \"%s\"",
orig_num)));
errmsg("invalid input syntax for type %s: \"%s\"",
"real", orig_num)));
errno = 0;
val = strtod(num, &endptr);
@ -315,8 +315,8 @@ float4in(PG_FUNCTION_ARGS)
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type real: \"%s\"",
orig_num)));
errmsg("invalid input syntax for type %s: \"%s\"",
"real", orig_num)));
}
#ifdef HAVE_BUGGY_SOLARIS_STRTOD
else
@ -339,8 +339,8 @@ float4in(PG_FUNCTION_ARGS)
if (*endptr != '\0')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type real: \"%s\"",
orig_num)));
errmsg("invalid input syntax for type %s: \"%s\"",
"real", orig_num)));
/*
* if we get here, we have a legal double, still need to check to see if