Skip to content

Commit

Permalink
Prepare 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cevian committed Aug 12, 2024
1 parent dffdb7b commit 04e1d13
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pgvectorscale/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vectorscale"
version = "0.2.0"
version = "0.3.0"
edition = "2021"

[lib]
Expand Down
4 changes: 2 additions & 2 deletions pgvectorscale/sql/vectorscale--0.0.2--0.2.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ALTER FUNCTION tsv_amhandler(internal) RENAME TO diskann_amhandler;
-- src/access_method/mod.rs:48
-- pgvectorscale::access_method::amhandler

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';
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';

DO $$
DECLARE
Expand Down Expand Up @@ -50,4 +50,4 @@ BEGIN
OPERATOR 1 <=> (vector, vector) FOR ORDER BY float_ops;
END IF;
END;
$$;
$$;
1 change: 1 addition & 0 deletions pgvectorscale/sql/vectorscale--0.0.2--0.3.0.sql
50 changes: 50 additions & 0 deletions pgvectorscale/sql/vectorscale--0.2.0--0.3.0.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
This file is auto generated by pgrx.
The ordering of items is not stable, it is driven by a dependency graph.
*/

-- src/access_method/mod.rs:44
-- vectorscale::access_method::amhandler

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';

DO $$
DECLARE
c int;
BEGIN
SELECT count(*)
INTO c
FROM pg_catalog.pg_am a
WHERE a.amname = 'diskann';

IF c = 0 THEN
CREATE ACCESS METHOD diskann TYPE INDEX HANDLER diskann_amhandler;
END IF;
END;
$$;




-- src/access_method/mod.rs:89

DO $$
DECLARE
c int;
BEGIN
SELECT count(*)
INTO c
FROM pg_catalog.pg_opclass c
WHERE c.opcname = 'vector_cosine_ops'
AND c.opcmethod = (SELECT oid FROM pg_catalog.pg_am am WHERE am.amname = 'diskann');

IF c = 0 THEN
CREATE OPERATOR CLASS vector_cosine_ops DEFAULT
FOR TYPE vector USING diskann AS
OPERATOR 1 <=> (vector, vector) FOR ORDER BY float_ops;
END IF;
END;
$$;


0 comments on commit 04e1d13

Please sign in to comment.