Check typmod when casting [skip ci]

This commit is contained in:
Andrew Kane
2024-03-30 23:32:07 -07:00
parent 56622e73fb
commit 5a229ba984
4 changed files with 10 additions and 0 deletions

View File

@@ -58,6 +58,10 @@ SELECT '[1,2,3]'::halfvec::vector;
[1,2,3]
(1 row)
SELECT '[1,2,3]'::vector::halfvec(2);
ERROR: expected 2 dimensions, not 3
SELECT '[1,2,3]'::halfvec::vector(2);
ERROR: expected 2 dimensions, not 3
SELECT '[1e-8]'::vector::halfvec;
halfvec
---------