Skip to content

Commit 04e1d13

Browse files
committed
Prepare 0.3.0
1 parent dffdb7b commit 04e1d13

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed

pgvectorscale/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vectorscale"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
edition = "2021"
55

66
[lib]

pgvectorscale/sql/vectorscale--0.0.2--0.2.0.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ALTER FUNCTION tsv_amhandler(internal) RENAME TO diskann_amhandler;
1212
-- src/access_method/mod.rs:48
1313
-- pgvectorscale::access_method::amhandler
1414

15-
CREATE OR REPLACE FUNCTION diskann_amhandler(internal) RETURNS index_am_handler PARALLEL SAFE IMMUTABLE STRICT COST 0.0001 LANGUAGE c AS '$libdir/pgvectorscale-0.0.3-dev', 'amhandler_wrapper';
15+
CREATE OR REPLACE FUNCTION diskann_amhandler(internal) RETURNS index_am_handler PARALLEL SAFE IMMUTABLE STRICT COST 0.0001 LANGUAGE c AS '$libdir/vectorscale-0.2.0', 'amhandler_wrapper';
1616

1717
DO $$
1818
DECLARE
@@ -50,4 +50,4 @@ BEGIN
5050
OPERATOR 1 <=> (vector, vector) FOR ORDER BY float_ops;
5151
END IF;
5252
END;
53-
$$;
53+
$$;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vectorscale--0.2.0--0.3.0.sql
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
This file is auto generated by pgrx.
3+
4+
The ordering of items is not stable, it is driven by a dependency graph.
5+
*/
6+
7+
-- src/access_method/mod.rs:44
8+
-- vectorscale::access_method::amhandler
9+
10+
CREATE OR REPLACE FUNCTION diskann_amhandler(internal) RETURNS index_am_handler PARALLEL SAFE IMMUTABLE STRICT COST 0.0001 LANGUAGE c AS '$libdir/vectorscale-0.3.0', 'amhandler_wrapper';
11+
12+
DO $$
13+
DECLARE
14+
c int;
15+
BEGIN
16+
SELECT count(*)
17+
INTO c
18+
FROM pg_catalog.pg_am a
19+
WHERE a.amname = 'diskann';
20+
21+
IF c = 0 THEN
22+
CREATE ACCESS METHOD diskann TYPE INDEX HANDLER diskann_amhandler;
23+
END IF;
24+
END;
25+
$$;
26+
27+
28+
29+
30+
-- src/access_method/mod.rs:89
31+
32+
DO $$
33+
DECLARE
34+
c int;
35+
BEGIN
36+
SELECT count(*)
37+
INTO c
38+
FROM pg_catalog.pg_opclass c
39+
WHERE c.opcname = 'vector_cosine_ops'
40+
AND c.opcmethod = (SELECT oid FROM pg_catalog.pg_am am WHERE am.amname = 'diskann');
41+
42+
IF c = 0 THEN
43+
CREATE OPERATOR CLASS vector_cosine_ops DEFAULT
44+
FOR TYPE vector USING diskann AS
45+
OPERATOR 1 <=> (vector, vector) FOR ORDER BY float_ops;
46+
END IF;
47+
END;
48+
$$;
49+
50+

0 commit comments

Comments
 (0)