mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 16:16:56 +08:00
Improved sparsevec input test [skip ci]
This commit is contained in:
@@ -310,6 +310,9 @@ sparsevec_in(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
stringEnd++;
|
stringEnd++;
|
||||||
|
|
||||||
|
while (sparsevec_isspace(*stringEnd))
|
||||||
|
stringEnd++;
|
||||||
|
|
||||||
if (*stringEnd != '/')
|
if (*stringEnd != '/')
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
|
||||||
@@ -318,6 +321,9 @@ sparsevec_in(PG_FUNCTION_ARGS)
|
|||||||
|
|
||||||
stringEnd++;
|
stringEnd++;
|
||||||
|
|
||||||
|
while (sparsevec_isspace(*stringEnd))
|
||||||
|
stringEnd++;
|
||||||
|
|
||||||
/* Use similar logic as int2vectorin */
|
/* Use similar logic as int2vectorin */
|
||||||
errno = 0;
|
errno = 0;
|
||||||
pt = stringEnd;
|
pt = stringEnd;
|
||||||
|
|||||||
Reference in New Issue
Block a user