mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-29 17:21:16 +08:00
Added support for bigint attributes [skip ci]
This commit is contained in:
@@ -4,7 +4,15 @@
|
||||
CREATE FUNCTION hnsw_attribute_distance(integer, integer) RETURNS float8
|
||||
AS 'MODULE_PATHNAME', 'hnsw_int4_attribute_distance' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION hnsw_attribute_distance(bigint, bigint) RETURNS float8
|
||||
AS 'MODULE_PATHNAME', 'hnsw_int8_attribute_distance' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE OPERATOR CLASS vector_integer_ops
|
||||
DEFAULT FOR TYPE integer USING hnsw AS
|
||||
OPERATOR 2 = (integer, integer),
|
||||
FUNCTION 3 hnsw_attribute_distance(integer, integer);
|
||||
|
||||
CREATE OPERATOR CLASS vector_bigint_ops
|
||||
DEFAULT FOR TYPE bigint USING hnsw AS
|
||||
OPERATOR 2 = (bigint, bigint),
|
||||
FUNCTION 3 hnsw_attribute_distance(bigint, bigint);
|
||||
|
||||
@@ -296,7 +296,15 @@ CREATE OPERATOR CLASS vector_cosine_ops
|
||||
CREATE FUNCTION hnsw_attribute_distance(integer, integer) RETURNS float8
|
||||
AS 'MODULE_PATHNAME', 'hnsw_int4_attribute_distance' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE FUNCTION hnsw_attribute_distance(bigint, bigint) RETURNS float8
|
||||
AS 'MODULE_PATHNAME', 'hnsw_int8_attribute_distance' LANGUAGE C IMMUTABLE STRICT PARALLEL SAFE;
|
||||
|
||||
CREATE OPERATOR CLASS vector_integer_ops
|
||||
DEFAULT FOR TYPE integer USING hnsw AS
|
||||
OPERATOR 2 = (integer, integer),
|
||||
FUNCTION 3 hnsw_attribute_distance(integer, integer);
|
||||
|
||||
CREATE OPERATOR CLASS vector_bigint_ops
|
||||
DEFAULT FOR TYPE bigint USING hnsw AS
|
||||
OPERATOR 2 = (bigint, bigint),
|
||||
FUNCTION 3 hnsw_attribute_distance(bigint, bigint);
|
||||
|
||||
Reference in New Issue
Block a user