diff --git a/test/expected/ivfflat_l2.out b/test/expected/ivfflat_l2.out index 1f510f2..ae7670c 100644 --- a/test/expected/ivfflat_l2.out +++ b/test/expected/ivfflat_l2.out @@ -1,7 +1,7 @@ SET enable_seqscan = off; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 1); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 1); INSERT INTO t (val) VALUES ('[1,2,4]'); SELECT * FROM t ORDER BY val <-> '[3,3,3]'; val diff --git a/test/expected/ivfflat_options.out b/test/expected/ivfflat_options.out index 405a75d..1783ab3 100644 --- a/test/expected/ivfflat_options.out +++ b/test/expected/ivfflat_options.out @@ -1,9 +1,9 @@ SET enable_seqscan = off; CREATE TABLE t (val vector(3)); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 0); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 0); ERROR: value 0 out of bounds for option "lists" DETAIL: Valid values are between "1" and "32768". -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 32769); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 32769); ERROR: value 32769 out of bounds for option "lists" DETAIL: Valid values are between "1" and "32768". SHOW ivfflat.probes; diff --git a/test/expected/ivfflat_unlogged.out b/test/expected/ivfflat_unlogged.out index 198ea97..724886f 100644 --- a/test/expected/ivfflat_unlogged.out +++ b/test/expected/ivfflat_unlogged.out @@ -1,7 +1,7 @@ SET enable_seqscan = off; CREATE UNLOGGED TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 1); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 1); SELECT * FROM t ORDER BY val <-> '[3,3,3]'; val --------- diff --git a/test/sql/ivfflat_l2.sql b/test/sql/ivfflat_l2.sql index 9349572..4772978 100644 --- a/test/sql/ivfflat_l2.sql +++ b/test/sql/ivfflat_l2.sql @@ -2,7 +2,7 @@ SET enable_seqscan = off; CREATE TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 1); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 1); INSERT INTO t (val) VALUES ('[1,2,4]'); diff --git a/test/sql/ivfflat_options.sql b/test/sql/ivfflat_options.sql index d8dc45c..14079c7 100644 --- a/test/sql/ivfflat_options.sql +++ b/test/sql/ivfflat_options.sql @@ -1,8 +1,8 @@ SET enable_seqscan = off; CREATE TABLE t (val vector(3)); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 0); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 32769); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 0); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 32769); SHOW ivfflat.probes; diff --git a/test/sql/ivfflat_unlogged.sql b/test/sql/ivfflat_unlogged.sql index ca4c6ba..fb89006 100644 --- a/test/sql/ivfflat_unlogged.sql +++ b/test/sql/ivfflat_unlogged.sql @@ -2,7 +2,7 @@ SET enable_seqscan = off; CREATE UNLOGGED TABLE t (val vector(3)); INSERT INTO t (val) VALUES ('[0,0,0]'), ('[1,2,3]'), ('[1,1,1]'), (NULL); -CREATE INDEX ON t USING ivfflat (val) WITH (lists = 1); +CREATE INDEX ON t USING ivfflat (val vector_l2_ops) WITH (lists = 1); SELECT * FROM t ORDER BY val <-> '[3,3,3]'; diff --git a/test/t/001_ivfflat_wal.pl b/test/t/001_ivfflat_wal.pl index 34bcfab..be249ef 100644 --- a/test/t/001_ivfflat_wal.pl +++ b/test/t/001_ivfflat_wal.pl @@ -79,7 +79,7 @@ $node_primary->safe_psql("postgres", "CREATE TABLE tst (i int4, v vector($dim)); $node_primary->safe_psql("postgres", "INSERT INTO tst SELECT i % 10, ARRAY[$array_sql] FROM generate_series(1, 100000) i;" ); -$node_primary->safe_psql("postgres", "CREATE INDEX ON tst USING ivfflat (v);"); +$node_primary->safe_psql("postgres", "CREATE INDEX ON tst USING ivfflat (v vector_l2_ops);"); # Test that queries give same result test_index_replay('initial'); diff --git a/test/t/002_ivfflat_vacuum.pl b/test/t/002_ivfflat_vacuum.pl index 37d01d0..d930444 100644 --- a/test/t/002_ivfflat_vacuum.pl +++ b/test/t/002_ivfflat_vacuum.pl @@ -25,7 +25,7 @@ $node->safe_psql("postgres", "CREATE TABLE tst (i int4, v vector($dim));"); $node->safe_psql("postgres", "INSERT INTO tst SELECT i % 10, ARRAY[$array_sql] FROM generate_series(1, 100000) i;" ); -$node->safe_psql("postgres", "CREATE INDEX ON tst USING ivfflat (v);"); +$node->safe_psql("postgres", "CREATE INDEX ON tst USING ivfflat (v vector_l2_ops);"); # Get size my $size = $node->safe_psql("postgres", "SELECT pg_total_relation_size('tst_v_idx');"); diff --git a/test/t/004_ivfflat_centers.pl b/test/t/004_ivfflat_centers.pl index 47939ff..4c125dd 100644 --- a/test/t/004_ivfflat_centers.pl +++ b/test/t/004_ivfflat_centers.pl @@ -20,7 +20,7 @@ sub test_centers { my ($lists, $min) = @_; - my ($ret, $stdout, $stderr) = $node->psql("postgres", "CREATE INDEX ON tst USING ivfflat (v) WITH (lists = $lists);"); + my ($ret, $stdout, $stderr) = $node->psql("postgres", "CREATE INDEX ON tst USING ivfflat (v vector_l2_ops) WITH (lists = $lists);"); is($ret, 0, $stderr); } diff --git a/test/t/006_ivfflat_lists.pl b/test/t/006_ivfflat_lists.pl index 302c9b3..9812f50 100644 --- a/test/t/006_ivfflat_lists.pl +++ b/test/t/006_ivfflat_lists.pl @@ -16,8 +16,8 @@ $node->safe_psql("postgres", "INSERT INTO tst SELECT ARRAY[random(), random(), random()] FROM generate_series(1, 100000) i;" ); -$node->safe_psql("postgres", "CREATE INDEX lists50 ON tst USING ivfflat (v) WITH (lists = 50);"); -$node->safe_psql("postgres", "CREATE INDEX lists100 ON tst USING ivfflat (v) WITH (lists = 100);"); +$node->safe_psql("postgres", "CREATE INDEX lists50 ON tst USING ivfflat (v vector_l2_ops) WITH (lists = 50);"); +$node->safe_psql("postgres", "CREATE INDEX lists100 ON tst USING ivfflat (v vector_l2_ops) WITH (lists = 100);"); # Test prefers more lists my $res = $node->safe_psql("postgres", "EXPLAIN SELECT v FROM tst ORDER BY v <-> '[0.5,0.5,0.5]' LIMIT 10;"); @@ -26,7 +26,7 @@ unlike($res, qr/lists50/); # Test errors with too much memory my ($ret, $stdout, $stderr) = $node->psql("postgres", - "CREATE INDEX lists10000 ON tst USING ivfflat (v) WITH (lists = 10000);" + "CREATE INDEX lists10000 ON tst USING ivfflat (v vector_l2_ops) WITH (lists = 10000);" ); like($stderr, qr/memory required is/); diff --git a/test/t/007_ivfflat_inserts.pl b/test/t/007_ivfflat_inserts.pl index 6e8aa08..dd7a95d 100644 --- a/test/t/007_ivfflat_inserts.pl +++ b/test/t/007_ivfflat_inserts.pl @@ -19,7 +19,7 @@ $node->safe_psql("postgres", "CREATE TABLE tst (v vector($dim));"); $node->safe_psql("postgres", "INSERT INTO tst SELECT ARRAY[$array_sql] FROM generate_series(1, 10000) i;" ); -$node->safe_psql("postgres", "CREATE INDEX ON tst USING ivfflat (v);"); +$node->safe_psql("postgres", "CREATE INDEX ON tst USING ivfflat (v vector_l2_ops);"); $node->pgbench( "--no-vacuum --client=5 --transactions=100",