Moved whitespace check

This commit is contained in:
Andrew Kane
2023-06-08 19:52:49 -07:00
parent 41c68bf692
commit 198390333e

View File

@@ -193,14 +193,14 @@ vector_in(PG_FUNCTION_ARGS)
CheckElement(x[dim]);
dim++;
while (vector_isspace(*stringEnd))
stringEnd++;
if (stringEnd == pt)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for type vector: \"%s\"", pt)));
while (vector_isspace(*stringEnd))
stringEnd++;
if (*stringEnd != '\0' && *stringEnd != ']')
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),