mirror of
https://github.com/postgres/postgres.git
synced 2025-11-04 20:11:56 +03:00
Message style improvements
This commit is contained in:
@@ -3590,14 +3590,15 @@ DCH_from_char(FormatNode *node, const char *in, TmFromChar *out,
|
||||
if (matched < 2)
|
||||
ereturn(escontext,,
|
||||
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
|
||||
errmsg("invalid input string for \"Y,YYY\"")));
|
||||
errmsg("invalid value \"%s\" for \"%s\"",
|
||||
s, "Y,YYY")));
|
||||
|
||||
/* years += (millennia * 1000); */
|
||||
if (pg_mul_s32_overflow(millennia, 1000, &millennia) ||
|
||||
pg_add_s32_overflow(years, millennia, &years))
|
||||
ereturn(escontext,,
|
||||
(errcode(ERRCODE_DATETIME_FIELD_OVERFLOW),
|
||||
errmsg("value for \"Y,YYY\" in source string is out of range")));
|
||||
errmsg("value for \"%s\" in source string is out of range", "Y,YYY")));
|
||||
|
||||
if (!from_char_set_int(&out->year, years, n, escontext))
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user