Added tests for index dimensions [skip ci]

This commit is contained in:
Andrew Kane
2026-07-01 12:15:27 -07:00
parent b383e4d191
commit a76a18d526
8 changed files with 78 additions and 0 deletions

View File

@@ -100,3 +100,11 @@ SELECT COUNT(*) FROM (SELECT * FROM t ORDER BY val <+> (SELECT NULL::halfvec)) t
(1 row)
DROP TABLE t;
-- dimensions
CREATE TABLE t (val halfvec(4000));
CREATE INDEX ON t USING hnsw (val halfvec_l2_ops);
DROP TABLE t;
CREATE TABLE t (val halfvec(4001));
CREATE INDEX ON t USING hnsw (val halfvec_l2_ops);
ERROR: column cannot have more than 4000 dimensions for hnsw index
DROP TABLE t;