Files
pgvector/expected/cast.out
Andrew Kane 6df7fa05b2 First commit
2021-04-20 14:04:28 -07:00

31 lines
674 B
Plaintext

SET client_min_messages = warning;
CREATE EXTENSION IF NOT EXISTS vector;
SELECT ARRAY[1,2,3]::vector;
array
---------
[1,2,3]
(1 row)
SELECT ARRAY[1,2,3]::float4[]::vector;
array
---------
[1,2,3]
(1 row)
SELECT ARRAY[1,2,3]::float8[]::vector;
array
---------
[1,2,3]
(1 row)
SELECT '{NULL}'::real[]::vector;
ERROR: array must not containing NULLs
SELECT '{NaN}'::real[]::vector;
ERROR: NaN not allowed in vector
SELECT '{Infinity}'::real[]::vector;
ERROR: infinite value not allowed in vector
SELECT '{-Infinity}'::real[]::vector;
ERROR: infinite value not allowed in vector
SELECT '{}'::real[]::vector;
ERROR: vector must have at least 1 dimension