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