mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-14 00:26:55 +08:00
Moved whitespace check
This commit is contained in:
@@ -193,14 +193,14 @@ vector_in(PG_FUNCTION_ARGS)
|
|||||||
CheckElement(x[dim]);
|
CheckElement(x[dim]);
|
||||||
dim++;
|
dim++;
|
||||||
|
|
||||||
while (vector_isspace(*stringEnd))
|
|
||||||
stringEnd++;
|
|
||||||
|
|
||||||
if (stringEnd == pt)
|
if (stringEnd == pt)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
||||||
errmsg("invalid input syntax for type vector: \"%s\"", pt)));
|
errmsg("invalid input syntax for type vector: \"%s\"", pt)));
|
||||||
|
|
||||||
|
while (vector_isspace(*stringEnd))
|
||||||
|
stringEnd++;
|
||||||
|
|
||||||
if (*stringEnd != '\0' && *stringEnd != ']')
|
if (*stringEnd != '\0' && *stringEnd != ']')
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
||||||
|
|||||||
Reference in New Issue
Block a user