mirror of
https://github.com/pgvector/pgvector.git
synced 2026-12-05 08:48:38 +00:00
Improved property testing for indexes
This commit is contained in:
1 parent
3fc275dab2
commit
8cd9bd16e6
7 files changed
+132
-4
No files matched your search
@@ -119,3 +119,17 @@ INSERT INTO t (val) VALUES (array_fill(0, ARRAY[2000]));
|
||||
CREATE INDEX ON t USING ivfflat (val vector_l2_ops);
|
||||
DROP TABLE t;
|
||||
RESET maintenance_work_mem;
|
||||
|
||||
-- properties
|
||||
|
||||
SELECT pg_indexam_has_property(oid, 'distance_orderable') FROM pg_am WHERE amname = 'ivfflat';
|
||||
|
||||
CREATE TABLE t (val vector(3));
|
||||
CREATE INDEX idx ON t USING ivfflat (val vector_l2_ops);
|
||||
|
||||
SELECT pg_index_has_property('idx'::regclass, 'distance_orderable');
|
||||
SELECT pg_index_column_has_property('idx'::regclass, 1, 'distance_orderable');
|
||||
SELECT pg_index_column_has_property('idx'::regclass, 2, 'distance_orderable');
|
||||
SELECT pg_index_column_has_property('idx'::regclass, 1, 'search_nulls');
|
||||
|
||||
DROP TABLE t;
|
||||
Reference in new issue
Block a user