1
0
mirror of https://github.com/tensorchord/pgvecto.rs.git synced 2025-07-29 08:21:12 +03:00
Files
pgvecto.rs/tests/crash/create.slt
cutecutecat 98622ed077 chore: add crash test (#242)
* chore: add crash test

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>

* fix

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>

---------

Signed-off-by: cutecutecat <junyuchen@tensorchord.ai>
2024-01-09 08:13:13 +00:00

14 lines
366 B
Plaintext

statement ok
CREATE TABLE t (val vector(3));
statement ok
INSERT INTO t (val) SELECT ARRAY[random(), random(), random()]::real[] FROM generate_series(1, 1000);
statement ok
CREATE INDEX i ON t USING vectors (val vector_l2_ops)
WITH (options = "[indexing.hnsw]");
query I
SELECT COUNT(1) FROM (SELECT 1 FROM t ORDER BY val <-> '[0.5,0.5,0.5]' limit 10) t2;
----
10