Improved sparsevec input test [skip ci]

This commit is contained in:
Andrew Kane
2024-04-09 16:44:34 -07:00
parent 82a17b81f5
commit 62b411f94c
3 changed files with 8 additions and 2 deletions

View File

@@ -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;