Switched to strtoint for sparsevec input

This commit is contained in:
Andrew Kane
2024-04-24 09:56:09 -07:00
parent c198fd58ee
commit b2a5259607
3 changed files with 32 additions and 6 deletions

View File

@@ -191,8 +191,24 @@ SELECT '{}/1000001'::sparsevec;
ERROR: sparsevec cannot have more than 1000000 dimensions
LINE 1: SELECT '{}/1000001'::sparsevec;
^
SELECT '{}/2147483648'::sparsevec;
ERROR: dimensions "2147483648" is out of range for type sparsevec
LINE 1: SELECT '{}/2147483648'::sparsevec;
^
SELECT '{}/-2147483649'::sparsevec;
ERROR: dimensions "-2147483649" is out of range for type sparsevec
LINE 1: SELECT '{}/-2147483649'::sparsevec;
^
SELECT '{}/9223372036854775808'::sparsevec;
ERROR: dimensions "9223372036854775808" is out of range for type sparsevec
LINE 1: SELECT '{}/9223372036854775808'::sparsevec;
^
SELECT '{}/-9223372036854775809'::sparsevec;
ERROR: dimensions "-9223372036854775809" is out of range for type sparsevec
LINE 1: SELECT '{}/-9223372036854775809'::sparsevec;
^
SELECT '{0:1}/1'::sparsevec;
ERROR: index "0" is out of range for type sparsevec
ERROR: index must be greater than zero
LINE 1: SELECT '{0:1}/1'::sparsevec;
^
SELECT '{2:1}/1'::sparsevec;