Added casting to int[] [skip ci]

This commit is contained in:
Andrew Kane
2024-10-13 18:55:12 -07:00
parent 4765df1c50
commit 6221779f74
5 changed files with 44 additions and 1 deletions

View File

@@ -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;