Improved error message for invalid input syntax

This commit is contained in:
Andrew Kane
2023-06-11 12:00:04 -07:00
parent 5fdf5573a0
commit 7ee9e86b10
2 changed files with 4 additions and 4 deletions

View File

@@ -194,7 +194,7 @@ vector_in(PG_FUNCTION_ARGS)
if (stringEnd == pt)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type vector: \"%s\"", pt)));
errmsg("invalid input syntax for type vector: \"%s\"", lit)));
while (vector_isspace(*stringEnd))
stringEnd++;
@@ -202,7 +202,7 @@ vector_in(PG_FUNCTION_ARGS)
if (*stringEnd != '\0' && *stringEnd != ']')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type vector: \"%s\"", pt)));
errmsg("invalid input syntax for type vector: \"%s\"", lit)));
pt = strtok(NULL, ",");
}