Improved error message for invalid input syntax

This commit is contained in:
Andrew Kane
2023-06-11 12:00:04 -07:00
parent 5fdf5573a0
commit 7ee9e86b10
2 changed files with 4 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ SELECT '[1.23456]'::vector;
(1 row)
SELECT '[hello,1]'::vector;
ERROR: invalid input syntax for type vector: "hello"
ERROR: invalid input syntax for type vector: "[hello,1]"
LINE 1: SELECT '[hello,1]'::vector;
^
SELECT '[NaN,1]'::vector;
@@ -62,7 +62,7 @@ ERROR: vector must have at least 1 dimension
LINE 1: SELECT '[]'::vector;
^
SELECT '[1,]'::vector;
ERROR: invalid input syntax for type vector: "]"
ERROR: invalid input syntax for type vector: "[1,]"
LINE 1: SELECT '[1,]'::vector;
^
SELECT '[1,2,3]'::vector(2);