Go to the source code of this file.
◆ scanint8()
bool scanint8 |
( |
const char * |
str, |
|
|
bool |
errorOK, |
|
|
int64 * |
result |
|
) |
| |
Definition at line 55 of file int8.c.
References ereport, errcode(), errmsg(), ERROR, PG_INT64_MIN, pg_mul_s64_overflow(), pg_sub_s64_overflow(), generate_unaccent_rules::str, and unlikely.
Referenced by int8in(), make_const(), and parse_output_parameters().
57 const char *ptr =
str;
70 while (*ptr && isspace((
unsigned char) *ptr))
83 if (
unlikely(!isdigit((
unsigned char) *ptr)))
87 while (*ptr && isdigit((
unsigned char) *ptr))
89 int8 digit = (*ptr++ -
'0');
97 while (*ptr !=
'\0' && isspace((
unsigned char) *ptr))
117 (
errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
118 errmsg(
"value \"%s\" is out of range for type %s",
125 (
errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
126 errmsg(
"invalid input syntax for type %s: \"%s\"",
static bool pg_sub_s64_overflow(int64 a, int64 b, int64 *result)
int errcode(int sqlerrcode)
#define ereport(elevel,...)
static bool pg_mul_s64_overflow(int64 a, int64 b, int64 *result)
int errmsg(const char *fmt,...)