SELECT '[1,2,3]'::halfvec; halfvec --------- [1,2,3] (1 row) SELECT '[-1,-2,-3]'::halfvec; halfvec ------------ [-1,-2,-3] (1 row) SELECT '[1.,2.,3.]'::halfvec; halfvec --------- [1,2,3] (1 row) SELECT ' [ 1, 2 , 3 ] '::halfvec; halfvec --------- [1,2,3] (1 row) SELECT '[1.23456]'::halfvec; halfvec ------------ [1.234375] (1 row) SELECT '[hello,1]'::halfvec; ERROR: invalid input syntax for type halfvec: "[hello,1]" LINE 1: SELECT '[hello,1]'::halfvec; ^ SELECT '[NaN,1]'::halfvec; ERROR: NaN not allowed in halfvec LINE 1: SELECT '[NaN,1]'::halfvec; ^ SELECT '[Infinity,1]'::halfvec; ERROR: infinite value not allowed in halfvec LINE 1: SELECT '[Infinity,1]'::halfvec; ^ SELECT '[-Infinity,1]'::halfvec; ERROR: infinite value not allowed in halfvec LINE 1: SELECT '[-Infinity,1]'::halfvec; ^ SELECT '[65519,-65519]'::halfvec; halfvec ---------------- [65504,-65504] (1 row) SELECT '[65520,-65520]'::halfvec; ERROR: value out of range: overflow LINE 1: SELECT '[65520,-65520]'::halfvec; ^ SELECT '[1e-8,-1e-8]'::halfvec; ERROR: value out of range: underflow LINE 1: SELECT '[1e-8,-1e-8]'::halfvec; ^ SELECT '[4e38,1]'::halfvec; ERROR: infinite value not allowed in halfvec LINE 1: SELECT '[4e38,1]'::halfvec; ^ SELECT '[1,2,3'::halfvec; ERROR: malformed halfvec literal: "[1,2,3" LINE 1: SELECT '[1,2,3'::halfvec; ^ DETAIL: Unexpected end of input. SELECT '[1,2,3]9'::halfvec; ERROR: malformed halfvec literal: "[1,2,3]9" LINE 1: SELECT '[1,2,3]9'::halfvec; ^ DETAIL: Junk after closing right brace. SELECT '1,2,3'::halfvec; ERROR: malformed halfvec literal: "1,2,3" LINE 1: SELECT '1,2,3'::halfvec; ^ DETAIL: Vector contents must start with "[". SELECT ''::halfvec; ERROR: malformed halfvec literal: "" LINE 1: SELECT ''::halfvec; ^ DETAIL: Vector contents must start with "[". SELECT '['::halfvec; ERROR: malformed halfvec literal: "[" LINE 1: SELECT '['::halfvec; ^ DETAIL: Unexpected end of input. SELECT '[,'::halfvec; ERROR: malformed halfvec literal: "[," LINE 1: SELECT '[,'::halfvec; ^ DETAIL: Unexpected end of input. SELECT '[]'::halfvec; ERROR: halfvec must have at least 1 dimension LINE 1: SELECT '[]'::halfvec; ^ SELECT '[1,]'::halfvec; ERROR: invalid input syntax for type halfvec: "[1,]" LINE 1: SELECT '[1,]'::halfvec; ^ SELECT '[1a]'::halfvec; ERROR: invalid input syntax for type halfvec: "[1a]" LINE 1: SELECT '[1a]'::halfvec; ^ SELECT '[1,,3]'::halfvec; ERROR: malformed halfvec literal: "[1,,3]" LINE 1: SELECT '[1,,3]'::halfvec; ^ SELECT '[1, ,3]'::halfvec; ERROR: invalid input syntax for type halfvec: "[1, ,3]" LINE 1: SELECT '[1, ,3]'::halfvec; ^ SELECT '[1,2,3]'::halfvec(3); halfvec --------- [1,2,3] (1 row) SELECT '[1,2,3]'::halfvec(2); ERROR: expected 2 dimensions, not 3 SELECT '[1,2,3]'::halfvec(3, 2); ERROR: invalid type modifier LINE 1: SELECT '[1,2,3]'::halfvec(3, 2); ^ SELECT '[1,2,3]'::halfvec('a'); ERROR: invalid input syntax for type integer: "a" LINE 1: SELECT '[1,2,3]'::halfvec('a'); ^ SELECT '[1,2,3]'::halfvec(0); ERROR: dimensions for type halfvec must be at least 1 LINE 1: SELECT '[1,2,3]'::halfvec(0); ^ SELECT '[1,2,3]'::halfvec(16001); ERROR: dimensions for type halfvec cannot exceed 16000 LINE 1: SELECT '[1,2,3]'::halfvec(16001); ^ SELECT unnest('{"[1,2,3]", "[4,5,6]"}'::halfvec[]); unnest --------- [1,2,3] [4,5,6] (2 rows) SELECT '{"[1,2,3]"}'::halfvec(2)[]; ERROR: expected 2 dimensions, not 3