ereturn(escontext, false,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
errmsg("invalid combination of date conventions"),
- errhint("Do not mix Gregorian and ISO week date "
- "conventions in a formatting template.")));
+ errhint("Do not mix Gregorian and ISO week date conventions in a formatting template.")));
}
return true;
}
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
errmsg("conflicting values for \"%s\" field in formatting string",
node->key->name),
- errdetail("This value contradicts a previous setting "
- "for the same field type.")));
+ errdetail("This value contradicts a previous setting for the same field type.")));
*dest = value;
return true;
}
node->key->name),
errdetail("Field requires %zu characters, but only %zu remain.",
len, used),
- errhint("If your source string is not fixed-width, "
- "try using the \"FM\" modifier.")));
+ errhint("If your source string is not fixed-width, try using the \"FM\" modifier.")));
errno = 0;
result = strtol(copy, &last, 10);
copy, node->key->name),
errdetail("Field requires %zu characters, but only %zu could be parsed.",
len, used),
- errhint("If your source string is not fixed-width, "
- "try using the \"FM\" modifier.")));
+ errhint("If your source string is not fixed-width, try using the \"FM\" modifier.")));
*src += used;
}
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
errmsg("invalid value \"%s\" for \"%s\"",
copy, node->key->name),
- errdetail("The given value did not match any of "
- "the allowed values for this field.")));
+ errdetail("The given value did not match any of the allowed values for this field.")));
}
*src += len;
return true;
*/
ereturn(escontext,,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
- errmsg("invalid value \"%s\" for \"%s\"",
- s, n->key->name),
+ errmsg("invalid value \"%s\" for \"%s\"", s, n->key->name),
errdetail("Time zone abbreviation is not recognized.")));
}
/* otherwise parse it like OF */
if (matched < 2)
ereturn(escontext,,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
- errmsg("invalid value \"%s\" for \"%s\"",
- s, "Y,YYY")));
+ errmsg("invalid value \"%s\" for \"%s\"", s, "Y,YYY")));
/* years += (millennia * 1000); */
if (pg_mul_s32_overflow(millennia, 1000, &millennia) ||
if (!IS_VALID_JULIAN(tm.tm_year, tm.tm_mon, tm.tm_mday))
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("date out of range: \"%s\"",
- text_to_cstring(date_txt))));
+ errmsg("date out of range: \"%s\"", text_to_cstring(date_txt))));
result = date2j(tm.tm_year, tm.tm_mon, tm.tm_mday) - POSTGRES_EPOCH_JDATE;
if (!IS_VALID_DATE(result))
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("date out of range: \"%s\"",
- text_to_cstring(date_txt))));
+ errmsg("date out of range: \"%s\"", text_to_cstring(date_txt))));
PG_RETURN_DATEADT(result);
}
if (!IS_VALID_JULIAN(tm.tm_year, tm.tm_mon, tm.tm_mday))
ereturn(escontext, (Datum) 0,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("date out of range: \"%s\"",
- text_to_cstring(date_txt))));
+ errmsg("date out of range: \"%s\"", text_to_cstring(date_txt))));
result = date2j(tm.tm_year, tm.tm_mon, tm.tm_mday) -
POSTGRES_EPOCH_JDATE;
if (!IS_VALID_DATE(result))
ereturn(escontext, (Datum) 0,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("date out of range: \"%s\"",
- text_to_cstring(date_txt))));
+ errmsg("date out of range: \"%s\"", text_to_cstring(date_txt))));
*typid = DATEOID;
return DateADTGetDatum(result);
{
errsave(escontext,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
- errmsg("hour \"%d\" is invalid for the 12-hour clock",
- tm->tm_hour),
+ errmsg("hour \"%d\" is invalid for the 12-hour clock", tm->tm_hour),
errhint("Use the 24-hour clock, or give an hour between 1 and 12.")));
goto fail;
}