mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Added casting to int[] [skip ci]
This commit is contained in:
@@ -735,11 +735,17 @@ CREATE FUNCTION intvec(intvec, integer, boolean) RETURNS intvec
|
||||
CREATE FUNCTION array_to_intvec(integer[], integer, boolean) RETURNS intvec
|
||||
AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION intvec_to_int(intvec, integer, boolean) RETURNS int[]
|
||||
AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
-- intvec casts
|
||||
|
||||
CREATE CAST (intvec AS intvec)
|
||||
WITH FUNCTION intvec(intvec, integer, boolean) AS IMPLICIT;
|
||||
|
||||
CREATE CAST (intvec AS int[])
|
||||
WITH FUNCTION intvec_to_int(intvec, integer, boolean) AS ASSIGNMENT;
|
||||
|
||||
CREATE CAST (integer[] AS intvec)
|
||||
WITH FUNCTION array_to_intvec(integer[], integer, boolean) AS ASSIGNMENT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user