From 013da5d738336a6fa24258483948719c4c65e9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E9=A3=8E=E6=AD=8C?= Date: Tue, 26 Mar 2024 22:33:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=94=AF=E6=8C=81DataVec=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/{pgvector => datavec}/CHANGELOG.md | 0 contrib/{pgvector => datavec}/Dockerfile | 0 contrib/{pgvector => datavec}/LICENSE | 0 contrib/{pgvector => datavec}/META.json | 0 contrib/{pgvector => datavec}/Makefile | 17 +++++++++-------- contrib/{pgvector => datavec}/Makefile.win | 0 contrib/{pgvector => datavec}/README.md | 0 .../vector.control => datavec/datavec.control} | 2 +- .../sql/datavec--0.1.0--0.1.1.sql} | 0 .../sql/datavec--0.1.1--0.1.3.sql} | 0 .../sql/datavec--0.1.3--0.1.4.sql} | 0 .../sql/datavec--0.1.4--0.1.5.sql} | 0 .../sql/datavec--0.1.5--0.1.6.sql} | 0 .../sql/datavec--0.1.6--0.1.7.sql} | 0 .../sql/datavec--0.1.7--0.1.8.sql} | 0 .../sql/datavec--0.1.8--0.2.0.sql} | 0 .../sql/datavec--0.2.0--0.2.1.sql} | 0 .../sql/datavec--0.2.1--0.2.2.sql} | 0 .../sql/datavec--0.2.2--0.2.3.sql} | 0 .../sql/datavec--0.2.3--0.2.4.sql} | 0 .../sql/datavec--0.2.4--0.2.5.sql} | 0 .../sql/datavec--0.2.5--0.2.6.sql} | 0 .../sql/datavec--0.2.6--0.2.7.sql} | 0 .../sql/datavec--0.2.7--0.3.0.sql} | 0 .../sql/datavec--0.3.0--0.3.1.sql} | 0 .../sql/datavec--0.3.1--0.3.2.sql} | 0 .../sql/datavec--0.3.2--0.4.0.sql} | 0 .../sql/datavec--0.4.0--0.4.1.sql} | 0 .../sql/datavec--0.4.1--0.4.2.sql} | 0 .../sql/datavec--0.4.2--0.4.3.sql} | 0 .../sql/datavec--0.4.3--0.4.4.sql} | 0 .../sql/vector.sql => datavec/sql/datavec.sql} | 2 +- contrib/{pgvector => datavec}/src/ivfbuild.c | 0 contrib/{pgvector => datavec}/src/ivfflat.c | 0 contrib/{pgvector => datavec}/src/ivfflat.h | 0 contrib/{pgvector => datavec}/src/ivfinsert.c | 0 contrib/{pgvector => datavec}/src/ivfkmeans.c | 0 contrib/{pgvector => datavec}/src/ivfscan.c | 0 contrib/{pgvector => datavec}/src/ivfutils.c | 0 contrib/{pgvector => datavec}/src/ivfvacuum.c | 0 contrib/{pgvector => datavec}/src/vector.c | 0 contrib/{pgvector => datavec}/src/vector.h | 0 .../test/expected/btree.out | 0 .../test/expected/cast.out | 0 .../test/expected/copy.out | 0 .../test/expected/functions.out | 0 .../test/expected/input.out | 0 .../test/expected/ivfflat_cosine.out | 0 .../test/expected/ivfflat_ip.out | 0 .../test/expected/ivfflat_l2.out | 0 .../test/expected/ivfflat_options.out | 0 .../test/expected/ivfflat_unlogged.out | 0 .../test/perl/PostgresNode.pm | 0 .../{pgvector => datavec}/test/perl/TestLib.pm | 0 .../{pgvector => datavec}/test/sql/btree.sql | 0 contrib/{pgvector => datavec}/test/sql/cast.sql | 0 contrib/{pgvector => datavec}/test/sql/copy.sql | 0 .../test/sql/functions.sql | 0 .../{pgvector => datavec}/test/sql/input.sql | 0 .../test/sql/ivfflat_cosine.sql | 0 .../test/sql/ivfflat_ip.sql | 0 .../test/sql/ivfflat_l2.sql | 0 .../test/sql/ivfflat_options.sql | 0 .../test/sql/ivfflat_unlogged.sql | 0 contrib/{pgvector => datavec}/test/t/001_wal.pl | 0 .../{pgvector => datavec}/test/t/002_vacuum.pl | 0 .../{pgvector => datavec}/test/t/003_recall.pl | 0 .../{pgvector => datavec}/test/t/004_centers.pl | 0 .../test/t/005_query_recall.pl | 0 .../{pgvector => datavec}/test/t/006_lists.pl | 0 .../{pgvector => datavec}/test/t/007_inserts.pl | 0 contrib/{pgvector => datavec}/test/t/008_avg.pl | 0 .../{pgvector => datavec}/test/t/009_storage.pl | 0 73 files changed, 11 insertions(+), 10 deletions(-) rename contrib/{pgvector => datavec}/CHANGELOG.md (100%) rename contrib/{pgvector => datavec}/Dockerfile (100%) rename contrib/{pgvector => datavec}/LICENSE (100%) rename contrib/{pgvector => datavec}/META.json (100%) rename contrib/{pgvector => datavec}/Makefile (89%) rename contrib/{pgvector => datavec}/Makefile.win (100%) rename contrib/{pgvector => datavec}/README.md (100%) rename contrib/{pgvector/vector.control => datavec/datavec.control} (73%) rename contrib/{pgvector/sql/vector--0.1.0--0.1.1.sql => datavec/sql/datavec--0.1.0--0.1.1.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.1--0.1.3.sql => datavec/sql/datavec--0.1.1--0.1.3.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.3--0.1.4.sql => datavec/sql/datavec--0.1.3--0.1.4.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.4--0.1.5.sql => datavec/sql/datavec--0.1.4--0.1.5.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.5--0.1.6.sql => datavec/sql/datavec--0.1.5--0.1.6.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.6--0.1.7.sql => datavec/sql/datavec--0.1.6--0.1.7.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.7--0.1.8.sql => datavec/sql/datavec--0.1.7--0.1.8.sql} (100%) rename contrib/{pgvector/sql/vector--0.1.8--0.2.0.sql => datavec/sql/datavec--0.1.8--0.2.0.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.0--0.2.1.sql => datavec/sql/datavec--0.2.0--0.2.1.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.1--0.2.2.sql => datavec/sql/datavec--0.2.1--0.2.2.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.2--0.2.3.sql => datavec/sql/datavec--0.2.2--0.2.3.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.3--0.2.4.sql => datavec/sql/datavec--0.2.3--0.2.4.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.4--0.2.5.sql => datavec/sql/datavec--0.2.4--0.2.5.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.5--0.2.6.sql => datavec/sql/datavec--0.2.5--0.2.6.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.6--0.2.7.sql => datavec/sql/datavec--0.2.6--0.2.7.sql} (100%) rename contrib/{pgvector/sql/vector--0.2.7--0.3.0.sql => datavec/sql/datavec--0.2.7--0.3.0.sql} (100%) rename contrib/{pgvector/sql/vector--0.3.0--0.3.1.sql => datavec/sql/datavec--0.3.0--0.3.1.sql} (100%) rename contrib/{pgvector/sql/vector--0.3.1--0.3.2.sql => datavec/sql/datavec--0.3.1--0.3.2.sql} (100%) rename contrib/{pgvector/sql/vector--0.3.2--0.4.0.sql => datavec/sql/datavec--0.3.2--0.4.0.sql} (100%) rename contrib/{pgvector/sql/vector--0.4.0--0.4.1.sql => datavec/sql/datavec--0.4.0--0.4.1.sql} (100%) rename contrib/{pgvector/sql/vector--0.4.1--0.4.2.sql => datavec/sql/datavec--0.4.1--0.4.2.sql} (100%) rename contrib/{pgvector/sql/vector--0.4.2--0.4.3.sql => datavec/sql/datavec--0.4.2--0.4.3.sql} (100%) rename contrib/{pgvector/sql/vector--0.4.3--0.4.4.sql => datavec/sql/datavec--0.4.3--0.4.4.sql} (100%) rename contrib/{pgvector/sql/vector.sql => datavec/sql/datavec.sql} (99%) rename contrib/{pgvector => datavec}/src/ivfbuild.c (100%) rename contrib/{pgvector => datavec}/src/ivfflat.c (100%) rename contrib/{pgvector => datavec}/src/ivfflat.h (100%) rename contrib/{pgvector => datavec}/src/ivfinsert.c (100%) rename contrib/{pgvector => datavec}/src/ivfkmeans.c (100%) rename contrib/{pgvector => datavec}/src/ivfscan.c (100%) rename contrib/{pgvector => datavec}/src/ivfutils.c (100%) rename contrib/{pgvector => datavec}/src/ivfvacuum.c (100%) rename contrib/{pgvector => datavec}/src/vector.c (100%) rename contrib/{pgvector => datavec}/src/vector.h (100%) rename contrib/{pgvector => datavec}/test/expected/btree.out (100%) rename contrib/{pgvector => datavec}/test/expected/cast.out (100%) rename contrib/{pgvector => datavec}/test/expected/copy.out (100%) rename contrib/{pgvector => datavec}/test/expected/functions.out (100%) rename contrib/{pgvector => datavec}/test/expected/input.out (100%) rename contrib/{pgvector => datavec}/test/expected/ivfflat_cosine.out (100%) rename contrib/{pgvector => datavec}/test/expected/ivfflat_ip.out (100%) rename contrib/{pgvector => datavec}/test/expected/ivfflat_l2.out (100%) rename contrib/{pgvector => datavec}/test/expected/ivfflat_options.out (100%) rename contrib/{pgvector => datavec}/test/expected/ivfflat_unlogged.out (100%) rename contrib/{pgvector => datavec}/test/perl/PostgresNode.pm (100%) rename contrib/{pgvector => datavec}/test/perl/TestLib.pm (100%) rename contrib/{pgvector => datavec}/test/sql/btree.sql (100%) rename contrib/{pgvector => datavec}/test/sql/cast.sql (100%) rename contrib/{pgvector => datavec}/test/sql/copy.sql (100%) rename contrib/{pgvector => datavec}/test/sql/functions.sql (100%) rename contrib/{pgvector => datavec}/test/sql/input.sql (100%) rename contrib/{pgvector => datavec}/test/sql/ivfflat_cosine.sql (100%) rename contrib/{pgvector => datavec}/test/sql/ivfflat_ip.sql (100%) rename contrib/{pgvector => datavec}/test/sql/ivfflat_l2.sql (100%) rename contrib/{pgvector => datavec}/test/sql/ivfflat_options.sql (100%) rename contrib/{pgvector => datavec}/test/sql/ivfflat_unlogged.sql (100%) rename contrib/{pgvector => datavec}/test/t/001_wal.pl (100%) rename contrib/{pgvector => datavec}/test/t/002_vacuum.pl (100%) rename contrib/{pgvector => datavec}/test/t/003_recall.pl (100%) rename contrib/{pgvector => datavec}/test/t/004_centers.pl (100%) rename contrib/{pgvector => datavec}/test/t/005_query_recall.pl (100%) rename contrib/{pgvector => datavec}/test/t/006_lists.pl (100%) rename contrib/{pgvector => datavec}/test/t/007_inserts.pl (100%) rename contrib/{pgvector => datavec}/test/t/008_avg.pl (100%) rename contrib/{pgvector => datavec}/test/t/009_storage.pl (100%) diff --git a/contrib/pgvector/CHANGELOG.md b/contrib/datavec/CHANGELOG.md similarity index 100% rename from contrib/pgvector/CHANGELOG.md rename to contrib/datavec/CHANGELOG.md diff --git a/contrib/pgvector/Dockerfile b/contrib/datavec/Dockerfile similarity index 100% rename from contrib/pgvector/Dockerfile rename to contrib/datavec/Dockerfile diff --git a/contrib/pgvector/LICENSE b/contrib/datavec/LICENSE similarity index 100% rename from contrib/pgvector/LICENSE rename to contrib/datavec/LICENSE diff --git a/contrib/pgvector/META.json b/contrib/datavec/META.json similarity index 100% rename from contrib/pgvector/META.json rename to contrib/datavec/META.json diff --git a/contrib/pgvector/Makefile b/contrib/datavec/Makefile similarity index 89% rename from contrib/pgvector/Makefile rename to contrib/datavec/Makefile index caf60291d..7c60b389e 100644 --- a/contrib/pgvector/Makefile +++ b/contrib/datavec/Makefile @@ -1,13 +1,14 @@ -EXTENSION = vector +EXTENSION = datavec EXTVERSION = 0.4.4 -MODULE_big = vector -DATA = $(wildcard sql/*--*.sql) +MODULE_big = datavec +DATA = sql/datavec--0.4.4.sql +#$(wildcard sql/*--*.sql) OBJS = src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/vector.o TESTS = $(wildcard test/sql/*.sql) REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS)) -REGRESS_OPTS = --inputdir=test --load-extension=vector +REGRESS_OPTS = --inputdir=test --load-extension=datavec OPTFLAGS = -march=native @@ -47,7 +48,7 @@ PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) include $(PGXS) else -subdir = contrib/pgvector +subdir = contrib/datavec top_builddir = ../.. include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk @@ -77,10 +78,10 @@ dist: .PHONY: docker docker: - docker build --pull --no-cache --platform linux/amd64 -t ankane/pgvector:latest . + docker build --pull --no-cache --platform linux/amd64 -t ankane/datavec:latest . .PHONY: docker-release docker-release: - docker buildx build --push --pull --no-cache --platform linux/amd64,linux/arm64 -t ankane/pgvector:latest . - docker buildx build --push --platform linux/amd64,linux/arm64 -t ankane/pgvector:v$(EXTVERSION) . + docker buildx build --push --pull --no-cache --platform linux/amd64,linux/arm64 -t ankane/datavec:latest . + docker buildx build --push --platform linux/amd64,linux/arm64 -t ankane/datavec:v$(EXTVERSION) . diff --git a/contrib/pgvector/Makefile.win b/contrib/datavec/Makefile.win similarity index 100% rename from contrib/pgvector/Makefile.win rename to contrib/datavec/Makefile.win diff --git a/contrib/pgvector/README.md b/contrib/datavec/README.md similarity index 100% rename from contrib/pgvector/README.md rename to contrib/datavec/README.md diff --git a/contrib/pgvector/vector.control b/contrib/datavec/datavec.control similarity index 73% rename from contrib/pgvector/vector.control rename to contrib/datavec/datavec.control index fe1f94e00..37db95efc 100644 --- a/contrib/pgvector/vector.control +++ b/contrib/datavec/datavec.control @@ -1,4 +1,4 @@ comment = 'vector data type and ivfflat access method' default_version = '0.4.4' -module_pathname = '$libdir/vector' +module_pathname = '$libdir/datavec' relocatable = true diff --git a/contrib/pgvector/sql/vector--0.1.0--0.1.1.sql b/contrib/datavec/sql/datavec--0.1.0--0.1.1.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.0--0.1.1.sql rename to contrib/datavec/sql/datavec--0.1.0--0.1.1.sql diff --git a/contrib/pgvector/sql/vector--0.1.1--0.1.3.sql b/contrib/datavec/sql/datavec--0.1.1--0.1.3.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.1--0.1.3.sql rename to contrib/datavec/sql/datavec--0.1.1--0.1.3.sql diff --git a/contrib/pgvector/sql/vector--0.1.3--0.1.4.sql b/contrib/datavec/sql/datavec--0.1.3--0.1.4.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.3--0.1.4.sql rename to contrib/datavec/sql/datavec--0.1.3--0.1.4.sql diff --git a/contrib/pgvector/sql/vector--0.1.4--0.1.5.sql b/contrib/datavec/sql/datavec--0.1.4--0.1.5.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.4--0.1.5.sql rename to contrib/datavec/sql/datavec--0.1.4--0.1.5.sql diff --git a/contrib/pgvector/sql/vector--0.1.5--0.1.6.sql b/contrib/datavec/sql/datavec--0.1.5--0.1.6.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.5--0.1.6.sql rename to contrib/datavec/sql/datavec--0.1.5--0.1.6.sql diff --git a/contrib/pgvector/sql/vector--0.1.6--0.1.7.sql b/contrib/datavec/sql/datavec--0.1.6--0.1.7.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.6--0.1.7.sql rename to contrib/datavec/sql/datavec--0.1.6--0.1.7.sql diff --git a/contrib/pgvector/sql/vector--0.1.7--0.1.8.sql b/contrib/datavec/sql/datavec--0.1.7--0.1.8.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.7--0.1.8.sql rename to contrib/datavec/sql/datavec--0.1.7--0.1.8.sql diff --git a/contrib/pgvector/sql/vector--0.1.8--0.2.0.sql b/contrib/datavec/sql/datavec--0.1.8--0.2.0.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.1.8--0.2.0.sql rename to contrib/datavec/sql/datavec--0.1.8--0.2.0.sql diff --git a/contrib/pgvector/sql/vector--0.2.0--0.2.1.sql b/contrib/datavec/sql/datavec--0.2.0--0.2.1.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.0--0.2.1.sql rename to contrib/datavec/sql/datavec--0.2.0--0.2.1.sql diff --git a/contrib/pgvector/sql/vector--0.2.1--0.2.2.sql b/contrib/datavec/sql/datavec--0.2.1--0.2.2.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.1--0.2.2.sql rename to contrib/datavec/sql/datavec--0.2.1--0.2.2.sql diff --git a/contrib/pgvector/sql/vector--0.2.2--0.2.3.sql b/contrib/datavec/sql/datavec--0.2.2--0.2.3.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.2--0.2.3.sql rename to contrib/datavec/sql/datavec--0.2.2--0.2.3.sql diff --git a/contrib/pgvector/sql/vector--0.2.3--0.2.4.sql b/contrib/datavec/sql/datavec--0.2.3--0.2.4.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.3--0.2.4.sql rename to contrib/datavec/sql/datavec--0.2.3--0.2.4.sql diff --git a/contrib/pgvector/sql/vector--0.2.4--0.2.5.sql b/contrib/datavec/sql/datavec--0.2.4--0.2.5.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.4--0.2.5.sql rename to contrib/datavec/sql/datavec--0.2.4--0.2.5.sql diff --git a/contrib/pgvector/sql/vector--0.2.5--0.2.6.sql b/contrib/datavec/sql/datavec--0.2.5--0.2.6.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.5--0.2.6.sql rename to contrib/datavec/sql/datavec--0.2.5--0.2.6.sql diff --git a/contrib/pgvector/sql/vector--0.2.6--0.2.7.sql b/contrib/datavec/sql/datavec--0.2.6--0.2.7.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.6--0.2.7.sql rename to contrib/datavec/sql/datavec--0.2.6--0.2.7.sql diff --git a/contrib/pgvector/sql/vector--0.2.7--0.3.0.sql b/contrib/datavec/sql/datavec--0.2.7--0.3.0.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.2.7--0.3.0.sql rename to contrib/datavec/sql/datavec--0.2.7--0.3.0.sql diff --git a/contrib/pgvector/sql/vector--0.3.0--0.3.1.sql b/contrib/datavec/sql/datavec--0.3.0--0.3.1.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.3.0--0.3.1.sql rename to contrib/datavec/sql/datavec--0.3.0--0.3.1.sql diff --git a/contrib/pgvector/sql/vector--0.3.1--0.3.2.sql b/contrib/datavec/sql/datavec--0.3.1--0.3.2.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.3.1--0.3.2.sql rename to contrib/datavec/sql/datavec--0.3.1--0.3.2.sql diff --git a/contrib/pgvector/sql/vector--0.3.2--0.4.0.sql b/contrib/datavec/sql/datavec--0.3.2--0.4.0.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.3.2--0.4.0.sql rename to contrib/datavec/sql/datavec--0.3.2--0.4.0.sql diff --git a/contrib/pgvector/sql/vector--0.4.0--0.4.1.sql b/contrib/datavec/sql/datavec--0.4.0--0.4.1.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.4.0--0.4.1.sql rename to contrib/datavec/sql/datavec--0.4.0--0.4.1.sql diff --git a/contrib/pgvector/sql/vector--0.4.1--0.4.2.sql b/contrib/datavec/sql/datavec--0.4.1--0.4.2.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.4.1--0.4.2.sql rename to contrib/datavec/sql/datavec--0.4.1--0.4.2.sql diff --git a/contrib/pgvector/sql/vector--0.4.2--0.4.3.sql b/contrib/datavec/sql/datavec--0.4.2--0.4.3.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.4.2--0.4.3.sql rename to contrib/datavec/sql/datavec--0.4.2--0.4.3.sql diff --git a/contrib/pgvector/sql/vector--0.4.3--0.4.4.sql b/contrib/datavec/sql/datavec--0.4.3--0.4.4.sql similarity index 100% rename from contrib/pgvector/sql/vector--0.4.3--0.4.4.sql rename to contrib/datavec/sql/datavec--0.4.3--0.4.4.sql diff --git a/contrib/pgvector/sql/vector.sql b/contrib/datavec/sql/datavec.sql similarity index 99% rename from contrib/pgvector/sql/vector.sql rename to contrib/datavec/sql/datavec.sql index 97603841c..104b12a97 100644 --- a/contrib/pgvector/sql/vector.sql +++ b/contrib/datavec/sql/datavec.sql @@ -1,5 +1,5 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "CREATE EXTENSION vector" to load this file. \quit +\echo Use "CREATE EXTENSION datavec" to load this file. \quit -- type diff --git a/contrib/pgvector/src/ivfbuild.c b/contrib/datavec/src/ivfbuild.c similarity index 100% rename from contrib/pgvector/src/ivfbuild.c rename to contrib/datavec/src/ivfbuild.c diff --git a/contrib/pgvector/src/ivfflat.c b/contrib/datavec/src/ivfflat.c similarity index 100% rename from contrib/pgvector/src/ivfflat.c rename to contrib/datavec/src/ivfflat.c diff --git a/contrib/pgvector/src/ivfflat.h b/contrib/datavec/src/ivfflat.h similarity index 100% rename from contrib/pgvector/src/ivfflat.h rename to contrib/datavec/src/ivfflat.h diff --git a/contrib/pgvector/src/ivfinsert.c b/contrib/datavec/src/ivfinsert.c similarity index 100% rename from contrib/pgvector/src/ivfinsert.c rename to contrib/datavec/src/ivfinsert.c diff --git a/contrib/pgvector/src/ivfkmeans.c b/contrib/datavec/src/ivfkmeans.c similarity index 100% rename from contrib/pgvector/src/ivfkmeans.c rename to contrib/datavec/src/ivfkmeans.c diff --git a/contrib/pgvector/src/ivfscan.c b/contrib/datavec/src/ivfscan.c similarity index 100% rename from contrib/pgvector/src/ivfscan.c rename to contrib/datavec/src/ivfscan.c diff --git a/contrib/pgvector/src/ivfutils.c b/contrib/datavec/src/ivfutils.c similarity index 100% rename from contrib/pgvector/src/ivfutils.c rename to contrib/datavec/src/ivfutils.c diff --git a/contrib/pgvector/src/ivfvacuum.c b/contrib/datavec/src/ivfvacuum.c similarity index 100% rename from contrib/pgvector/src/ivfvacuum.c rename to contrib/datavec/src/ivfvacuum.c diff --git a/contrib/pgvector/src/vector.c b/contrib/datavec/src/vector.c similarity index 100% rename from contrib/pgvector/src/vector.c rename to contrib/datavec/src/vector.c diff --git a/contrib/pgvector/src/vector.h b/contrib/datavec/src/vector.h similarity index 100% rename from contrib/pgvector/src/vector.h rename to contrib/datavec/src/vector.h diff --git a/contrib/pgvector/test/expected/btree.out b/contrib/datavec/test/expected/btree.out similarity index 100% rename from contrib/pgvector/test/expected/btree.out rename to contrib/datavec/test/expected/btree.out diff --git a/contrib/pgvector/test/expected/cast.out b/contrib/datavec/test/expected/cast.out similarity index 100% rename from contrib/pgvector/test/expected/cast.out rename to contrib/datavec/test/expected/cast.out diff --git a/contrib/pgvector/test/expected/copy.out b/contrib/datavec/test/expected/copy.out similarity index 100% rename from contrib/pgvector/test/expected/copy.out rename to contrib/datavec/test/expected/copy.out diff --git a/contrib/pgvector/test/expected/functions.out b/contrib/datavec/test/expected/functions.out similarity index 100% rename from contrib/pgvector/test/expected/functions.out rename to contrib/datavec/test/expected/functions.out diff --git a/contrib/pgvector/test/expected/input.out b/contrib/datavec/test/expected/input.out similarity index 100% rename from contrib/pgvector/test/expected/input.out rename to contrib/datavec/test/expected/input.out diff --git a/contrib/pgvector/test/expected/ivfflat_cosine.out b/contrib/datavec/test/expected/ivfflat_cosine.out similarity index 100% rename from contrib/pgvector/test/expected/ivfflat_cosine.out rename to contrib/datavec/test/expected/ivfflat_cosine.out diff --git a/contrib/pgvector/test/expected/ivfflat_ip.out b/contrib/datavec/test/expected/ivfflat_ip.out similarity index 100% rename from contrib/pgvector/test/expected/ivfflat_ip.out rename to contrib/datavec/test/expected/ivfflat_ip.out diff --git a/contrib/pgvector/test/expected/ivfflat_l2.out b/contrib/datavec/test/expected/ivfflat_l2.out similarity index 100% rename from contrib/pgvector/test/expected/ivfflat_l2.out rename to contrib/datavec/test/expected/ivfflat_l2.out diff --git a/contrib/pgvector/test/expected/ivfflat_options.out b/contrib/datavec/test/expected/ivfflat_options.out similarity index 100% rename from contrib/pgvector/test/expected/ivfflat_options.out rename to contrib/datavec/test/expected/ivfflat_options.out diff --git a/contrib/pgvector/test/expected/ivfflat_unlogged.out b/contrib/datavec/test/expected/ivfflat_unlogged.out similarity index 100% rename from contrib/pgvector/test/expected/ivfflat_unlogged.out rename to contrib/datavec/test/expected/ivfflat_unlogged.out diff --git a/contrib/pgvector/test/perl/PostgresNode.pm b/contrib/datavec/test/perl/PostgresNode.pm similarity index 100% rename from contrib/pgvector/test/perl/PostgresNode.pm rename to contrib/datavec/test/perl/PostgresNode.pm diff --git a/contrib/pgvector/test/perl/TestLib.pm b/contrib/datavec/test/perl/TestLib.pm similarity index 100% rename from contrib/pgvector/test/perl/TestLib.pm rename to contrib/datavec/test/perl/TestLib.pm diff --git a/contrib/pgvector/test/sql/btree.sql b/contrib/datavec/test/sql/btree.sql similarity index 100% rename from contrib/pgvector/test/sql/btree.sql rename to contrib/datavec/test/sql/btree.sql diff --git a/contrib/pgvector/test/sql/cast.sql b/contrib/datavec/test/sql/cast.sql similarity index 100% rename from contrib/pgvector/test/sql/cast.sql rename to contrib/datavec/test/sql/cast.sql diff --git a/contrib/pgvector/test/sql/copy.sql b/contrib/datavec/test/sql/copy.sql similarity index 100% rename from contrib/pgvector/test/sql/copy.sql rename to contrib/datavec/test/sql/copy.sql diff --git a/contrib/pgvector/test/sql/functions.sql b/contrib/datavec/test/sql/functions.sql similarity index 100% rename from contrib/pgvector/test/sql/functions.sql rename to contrib/datavec/test/sql/functions.sql diff --git a/contrib/pgvector/test/sql/input.sql b/contrib/datavec/test/sql/input.sql similarity index 100% rename from contrib/pgvector/test/sql/input.sql rename to contrib/datavec/test/sql/input.sql diff --git a/contrib/pgvector/test/sql/ivfflat_cosine.sql b/contrib/datavec/test/sql/ivfflat_cosine.sql similarity index 100% rename from contrib/pgvector/test/sql/ivfflat_cosine.sql rename to contrib/datavec/test/sql/ivfflat_cosine.sql diff --git a/contrib/pgvector/test/sql/ivfflat_ip.sql b/contrib/datavec/test/sql/ivfflat_ip.sql similarity index 100% rename from contrib/pgvector/test/sql/ivfflat_ip.sql rename to contrib/datavec/test/sql/ivfflat_ip.sql diff --git a/contrib/pgvector/test/sql/ivfflat_l2.sql b/contrib/datavec/test/sql/ivfflat_l2.sql similarity index 100% rename from contrib/pgvector/test/sql/ivfflat_l2.sql rename to contrib/datavec/test/sql/ivfflat_l2.sql diff --git a/contrib/pgvector/test/sql/ivfflat_options.sql b/contrib/datavec/test/sql/ivfflat_options.sql similarity index 100% rename from contrib/pgvector/test/sql/ivfflat_options.sql rename to contrib/datavec/test/sql/ivfflat_options.sql diff --git a/contrib/pgvector/test/sql/ivfflat_unlogged.sql b/contrib/datavec/test/sql/ivfflat_unlogged.sql similarity index 100% rename from contrib/pgvector/test/sql/ivfflat_unlogged.sql rename to contrib/datavec/test/sql/ivfflat_unlogged.sql diff --git a/contrib/pgvector/test/t/001_wal.pl b/contrib/datavec/test/t/001_wal.pl similarity index 100% rename from contrib/pgvector/test/t/001_wal.pl rename to contrib/datavec/test/t/001_wal.pl diff --git a/contrib/pgvector/test/t/002_vacuum.pl b/contrib/datavec/test/t/002_vacuum.pl similarity index 100% rename from contrib/pgvector/test/t/002_vacuum.pl rename to contrib/datavec/test/t/002_vacuum.pl diff --git a/contrib/pgvector/test/t/003_recall.pl b/contrib/datavec/test/t/003_recall.pl similarity index 100% rename from contrib/pgvector/test/t/003_recall.pl rename to contrib/datavec/test/t/003_recall.pl diff --git a/contrib/pgvector/test/t/004_centers.pl b/contrib/datavec/test/t/004_centers.pl similarity index 100% rename from contrib/pgvector/test/t/004_centers.pl rename to contrib/datavec/test/t/004_centers.pl diff --git a/contrib/pgvector/test/t/005_query_recall.pl b/contrib/datavec/test/t/005_query_recall.pl similarity index 100% rename from contrib/pgvector/test/t/005_query_recall.pl rename to contrib/datavec/test/t/005_query_recall.pl diff --git a/contrib/pgvector/test/t/006_lists.pl b/contrib/datavec/test/t/006_lists.pl similarity index 100% rename from contrib/pgvector/test/t/006_lists.pl rename to contrib/datavec/test/t/006_lists.pl diff --git a/contrib/pgvector/test/t/007_inserts.pl b/contrib/datavec/test/t/007_inserts.pl similarity index 100% rename from contrib/pgvector/test/t/007_inserts.pl rename to contrib/datavec/test/t/007_inserts.pl diff --git a/contrib/pgvector/test/t/008_avg.pl b/contrib/datavec/test/t/008_avg.pl similarity index 100% rename from contrib/pgvector/test/t/008_avg.pl rename to contrib/datavec/test/t/008_avg.pl diff --git a/contrib/pgvector/test/t/009_storage.pl b/contrib/datavec/test/t/009_storage.pl similarity index 100% rename from contrib/pgvector/test/t/009_storage.pl rename to contrib/datavec/test/t/009_storage.pl -- Gitee From 799759599e466c8129f6af3f3ee5d44fa30a137a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E9=A3=8E=E6=AD=8C?= Date: Wed, 27 Mar 2024 10:18:47 +0800 Subject: [PATCH 2/2] deleted unused and adjust extension info --- contrib/datavec/CHANGELOG.md | 4 +- contrib/datavec/Dockerfile | 10 +- contrib/datavec/META.json | 14 +-- contrib/datavec/Makefile | 1 - contrib/datavec/Makefile.win | 6 +- contrib/datavec/README.md | 104 +++++++++--------- contrib/datavec/sql/datavec--0.1.0--0.1.1.sql | 2 +- contrib/datavec/sql/datavec--0.1.1--0.1.3.sql | 2 +- contrib/datavec/sql/datavec--0.1.3--0.1.4.sql | 2 +- contrib/datavec/sql/datavec--0.1.4--0.1.5.sql | 2 +- contrib/datavec/sql/datavec--0.1.5--0.1.6.sql | 2 +- contrib/datavec/sql/datavec--0.1.6--0.1.7.sql | 2 +- contrib/datavec/sql/datavec--0.1.7--0.1.8.sql | 2 +- contrib/datavec/sql/datavec--0.1.8--0.2.0.sql | 2 +- contrib/datavec/sql/datavec--0.2.0--0.2.1.sql | 2 +- contrib/datavec/sql/datavec--0.2.1--0.2.2.sql | 2 +- contrib/datavec/sql/datavec--0.2.2--0.2.3.sql | 2 +- contrib/datavec/sql/datavec--0.2.3--0.2.4.sql | 2 +- contrib/datavec/sql/datavec--0.2.4--0.2.5.sql | 2 +- contrib/datavec/sql/datavec--0.2.5--0.2.6.sql | 2 +- contrib/datavec/sql/datavec--0.2.6--0.2.7.sql | 2 +- contrib/datavec/sql/datavec--0.2.7--0.3.0.sql | 2 +- contrib/datavec/sql/datavec--0.3.0--0.3.1.sql | 2 +- contrib/datavec/sql/datavec--0.3.1--0.3.2.sql | 2 +- contrib/datavec/sql/datavec--0.3.2--0.4.0.sql | 2 +- contrib/datavec/sql/datavec--0.4.0--0.4.1.sql | 2 +- contrib/datavec/sql/datavec--0.4.1--0.4.2.sql | 2 +- contrib/datavec/sql/datavec--0.4.2--0.4.3.sql | 2 +- contrib/datavec/sql/datavec--0.4.3--0.4.4.sql | 2 +- contrib/datavec/test/t/001_wal.pl | 2 +- contrib/datavec/test/t/002_vacuum.pl | 2 +- contrib/datavec/test/t/003_recall.pl | 2 +- contrib/datavec/test/t/004_centers.pl | 2 +- contrib/datavec/test/t/005_query_recall.pl | 2 +- contrib/datavec/test/t/006_lists.pl | 2 +- contrib/datavec/test/t/007_inserts.pl | 2 +- contrib/datavec/test/t/008_avg.pl | 2 +- contrib/datavec/test/t/009_storage.pl | 2 +- 38 files changed, 101 insertions(+), 102 deletions(-) diff --git a/contrib/datavec/CHANGELOG.md b/contrib/datavec/CHANGELOG.md index 794416670..ce921e538 100644 --- a/contrib/datavec/CHANGELOG.md +++ b/contrib/datavec/CHANGELOG.md @@ -28,7 +28,7 @@ ## 0.4.0 (2023-01-11) -If upgrading with Postgres < 13, see [this note](https://github.com/pgvector/pgvector#040). +If upgrading with Postgres < 13, see [this note](https://github.com/datavec/datavec#040). - Changed text representation for vector elements to match `real` - Changed storage for vector from `plain` to `extended` @@ -45,7 +45,7 @@ If upgrading with Postgres < 13, see [this note](https://github.com/pgvector/pgv ## 0.3.1 (2022-11-02) -If upgrading from 0.2.7 or 0.3.0, [recreate](https://github.com/pgvector/pgvector#031) all `ivfflat` indexes after upgrading to ensure all data is indexed. +If upgrading from 0.2.7 or 0.3.0, [recreate](https://github.com/datavec/datavec#031) all `ivfflat` indexes after upgrading to ensure all data is indexed. - Fixed issue with inserts silently corrupting `ivfflat` indexes (introduced in 0.2.7) - Fixed segmentation fault with index creation when lists > 6500 diff --git a/contrib/datavec/Dockerfile b/contrib/datavec/Dockerfile index 6fe309954..9283b5959 100644 --- a/contrib/datavec/Dockerfile +++ b/contrib/datavec/Dockerfile @@ -2,17 +2,17 @@ ARG PG_MAJOR=15 FROM postgres:$PG_MAJOR ARG PG_MAJOR -COPY . /tmp/pgvector +COPY . /tmp/datavec RUN apt-get update && \ apt-get install -y --no-install-recommends build-essential postgresql-server-dev-$PG_MAJOR && \ - cd /tmp/pgvector && \ + cd /tmp/datavec && \ make clean && \ make OPTFLAGS="" && \ make install && \ - mkdir /usr/share/doc/pgvector && \ - cp LICENSE README.md /usr/share/doc/pgvector && \ - rm -r /tmp/pgvector && \ + mkdir /usr/share/doc/datavec && \ + cp LICENSE README.md /usr/share/doc/datavec && \ + rm -r /tmp/datavec && \ apt-get remove -y build-essential postgresql-server-dev-$PG_MAJOR && \ apt-get autoremove -y && \ rm -rf /var/lib/apt/lists/* diff --git a/contrib/datavec/META.json b/contrib/datavec/META.json index a71d81086..fb66f2ded 100644 --- a/contrib/datavec/META.json +++ b/contrib/datavec/META.json @@ -1,5 +1,5 @@ { - "name": "vector", + "name": "datavec", "abstract": "Open-source vector similarity search for Postgres", "description": "Supports L2 distance, inner product, and cosine distance", "version": "0.4.4", @@ -17,21 +17,21 @@ } }, "provides": { - "vector": { - "file": "sql/vector.sql", + "datavec": { + "file": "sql/datavec.sql", "docfile": "README.md", "version": "0.4.4", "abstract": "Open-source vector similarity search for Postgres" } }, "resources": { - "homepage": "https://github.com/pgvector/pgvector", + "homepage": "https://github.com/datavec/datavec", "bugtracker": { - "web": "https://github.com/pgvector/pgvector/issues" + "web": "https://github.com/datavec/datavec/issues" }, "repository": { - "url": "https://github.com/pgvector/pgvector.git", - "web": "https://github.com/pgvector/pgvector", + "url": "https://github.com/datavec/datavec.git", + "web": "https://github.com/datavec/datavec", "type": "git" } }, diff --git a/contrib/datavec/Makefile b/contrib/datavec/Makefile index 7c60b389e..ca490e704 100644 --- a/contrib/datavec/Makefile +++ b/contrib/datavec/Makefile @@ -3,7 +3,6 @@ EXTVERSION = 0.4.4 MODULE_big = datavec DATA = sql/datavec--0.4.4.sql -#$(wildcard sql/*--*.sql) OBJS = src/ivfbuild.o src/ivfflat.o src/ivfinsert.o src/ivfkmeans.o src/ivfscan.o src/ivfutils.o src/ivfvacuum.o src/vector.o TESTS = $(wildcard test/sql/*.sql) diff --git a/contrib/datavec/Makefile.win b/contrib/datavec/Makefile.win index 8ceb57247..c7a614894 100644 --- a/contrib/datavec/Makefile.win +++ b/contrib/datavec/Makefile.win @@ -1,10 +1,10 @@ -EXTENSION = vector +EXTENSION = datavec EXTVERSION = 0.4.4 OBJS = src\ivfbuild.obj src\ivfflat.obj src\ivfinsert.obj src\ivfkmeans.obj src\ivfscan.obj src\ivfutils.obj src\ivfvacuum.obj src\vector.obj REGRESS = btree cast copy functions input ivfflat_cosine ivfflat_ip ivfflat_l2 ivfflat_options ivfflat_unlogged -REGRESS_OPTS = --inputdir=test --load-extension=vector +REGRESS_OPTS = --inputdir=test --load-extension=datavec # For /arch flags # https://learn.microsoft.com/en-us/cpp/build/reference/arch-minimum-cpu-architecture @@ -61,7 +61,7 @@ installcheck: uninstall: del /f "$(PKGLIBDIR)\$(SHLIB)" del /f "$(SHAREDIR)\extension\$(EXTENSION).control" - del /f "$(SHAREDIR)\extension\vector--*.sql" + del /f "$(SHAREDIR)\extension\datavec--*.sql" clean: del /f $(SHLIB) $(EXTENSION).lib $(EXTENSION).exp diff --git a/contrib/datavec/README.md b/contrib/datavec/README.md index be02c961e..23fefb44d 100644 --- a/contrib/datavec/README.md +++ b/contrib/datavec/README.md @@ -1,4 +1,4 @@ -# pgvector +# datavec Open-source vector similarity search for Postgres @@ -10,7 +10,7 @@ Supports Plus [ACID](https://en.wikipedia.org/wiki/ACID) compliance, point-in-time recovery, JOINs, and all of the other [great features](https://www.postgresql.org/about/) of Postgres -[![Build Status](https://github.com/pgvector/pgvector/workflows/build/badge.svg?branch=master)](https://github.com/pgvector/pgvector/actions) +[![Build Status](https://github.com/datavec/datavec/workflows/build/badge.svg?branch=master)](https://github.com/datavec/datavec/actions) ## Installation @@ -18,8 +18,8 @@ Compile and install the extension (supports Postgres 11+) ```sh cd /tmp -git clone --branch v0.4.4 https://github.com/pgvector/pgvector.git -cd pgvector +git clone --branch v0.4.4 https://github.com/datavec/datavec.git +cd datavec make make install # may need sudo ``` @@ -33,7 +33,7 @@ You can also install it with [Docker](#docker), [Homebrew](#homebrew), [PGXN](#p Enable the extension (do this once in each database where you want to use it) ```tsql -CREATE EXTENSION vector; +CREATE EXTENSION datavec; ``` Create a vector column with 3 dimensions @@ -155,7 +155,7 @@ SELECT category_id, AVG(embedding) FROM items GROUP BY category_id; ## Indexing -By default, pgvector performs exact nearest neighbor search, which provides perfect recall. +By default, datavec performs exact nearest neighbor search, which provides perfect recall. You can add an index to use approximate nearest neighbor search, which trades some recall for performance. Unlike typical indexes, you will see different results for queries after adding an approximate index. @@ -252,7 +252,7 @@ CREATE TABLE items (embedding vector(3), category_id int) PARTITION BY LIST(cate ## Hybrid Search -Use together with Postgres [full-text search](https://www.postgresql.org/docs/current/textsearch-intro.html) for hybrid search ([Python example](https://github.com/pgvector/pgvector-python/blob/master/examples/hybrid_search.py)). +Use together with Postgres [full-text search](https://www.postgresql.org/docs/current/textsearch-intro.html) for hybrid search ([Python example](https://github.com/datavec/datavec-python/blob/master/examples/hybrid_search.py)). ```sql SELECT id, content FROM items, to_tsquery('hello & search') query @@ -291,27 +291,27 @@ CREATE INDEX ON items USING ivfflat (embedding vector_l2_ops) WITH (lists = 1000 ## Languages -Use pgvector from any language with a Postgres client. You can even generate and store vectors in one language and query them in another. +Use datavec from any language with a Postgres client. You can even generate and store vectors in one language and query them in another. Language | Libraries / Examples --- | --- -C++ | [pgvector-cpp](https://github.com/pgvector/pgvector-cpp) -C# | [pgvector-dotnet](https://github.com/pgvector/pgvector-dotnet) -Crystal | [pgvector-crystal](https://github.com/pgvector/pgvector-crystal) -Elixir | [pgvector-elixir](https://github.com/pgvector/pgvector-elixir) -Go | [pgvector-go](https://github.com/pgvector/pgvector-go) -Haskell | [pgvector-haskell](https://github.com/pgvector/pgvector-haskell) -Java, Scala | [pgvector-java](https://github.com/pgvector/pgvector-java) -Julia | [pgvector-julia](https://github.com/pgvector/pgvector-julia) -Lua | [pgvector-lua](https://github.com/pgvector/pgvector-lua) -Node.js | [pgvector-node](https://github.com/pgvector/pgvector-node) -Perl | [pgvector-perl](https://github.com/pgvector/pgvector-perl) -PHP | [pgvector-php](https://github.com/pgvector/pgvector-php) -Python | [pgvector-python](https://github.com/pgvector/pgvector-python) -R | [pgvector-r](https://github.com/pgvector/pgvector-r) -Ruby | [pgvector-ruby](https://github.com/pgvector/pgvector-ruby), [Neighbor](https://github.com/ankane/neighbor) -Rust | [pgvector-rust](https://github.com/pgvector/pgvector-rust) -Swift | [pgvector-swift](https://github.com/pgvector/pgvector-swift) +C++ | [datavec-cpp](https://github.com/datavec/datavec-cpp) +C# | [datavec-dotnet](https://github.com/datavec/datavec-dotnet) +Crystal | [datavec-crystal](https://github.com/datavec/datavec-crystal) +Elixir | [datavec-elixir](https://github.com/datavec/datavec-elixir) +Go | [datavec-go](https://github.com/datavec/datavec-go) +Haskell | [datavec-haskell](https://github.com/datavec/datavec-haskell) +Java, Scala | [datavec-java](https://github.com/datavec/datavec-java) +Julia | [datavec-julia](https://github.com/datavec/datavec-julia) +Lua | [datavec-lua](https://github.com/datavec/datavec-lua) +Node.js | [datavec-node](https://github.com/datavec/datavec-node) +Perl | [datavec-perl](https://github.com/datavec/datavec-perl) +PHP | [datavec-php](https://github.com/datavec/datavec-php) +Python | [datavec-python](https://github.com/datavec/datavec-python) +R | [datavec-r](https://github.com/datavec/datavec-r) +Ruby | [datavec-ruby](https://github.com/datavec/datavec-ruby), [Neighbor](https://github.com/ankane/neighbor) +Rust | [datavec-rust](https://github.com/datavec/datavec-rust) +Swift | [datavec-swift](https://github.com/datavec/datavec-swift) ## Frequently Asked Questions @@ -321,7 +321,7 @@ A non-partitioned table has a limit of 32 TB by default in Postgres. A partition #### Is replication supported? -Yes, pgvector uses the write-ahead log (WAL), which allows for replication and point-in-time recovery. +Yes, datavec uses the write-ahead log (WAL), which allows for replication and point-in-time recovery. #### What if I want to index vectors with more than 2,000 dimensions? @@ -397,8 +397,8 @@ Support for Windows is currently experimental. Use `nmake` to build: ```cmd set "PGROOT=C:\Program Files\PostgreSQL\15" -git clone --branch v0.4.4 https://github.com/pgvector/pgvector.git -cd pgvector +git clone --branch v0.4.4 https://github.com/datavec/datavec.git +cd datavec nmake /F Makefile.win nmake /F Makefile.win install ``` @@ -407,20 +407,20 @@ nmake /F Makefile.win install ### Docker -Get the [Docker image](https://hub.docker.com/r/ankane/pgvector) with: +Get the [Docker image](https://hub.docker.com/r/ankane/datavec) with: ```sh -docker pull ankane/pgvector +docker pull ankane/datavec ``` -This adds pgvector to the [Postgres image](https://hub.docker.com/_/postgres) (run it the same way). +This adds datavec to the [Postgres image](https://hub.docker.com/_/postgres) (run it the same way). You can also build the image manually: ```sh -git clone --branch v0.4.4 https://github.com/pgvector/pgvector.git -cd pgvector -docker build --build-arg PG_MAJOR=15 -t myuser/pgvector . +git clone --branch v0.4.4 https://github.com/datavec/datavec.git +cd datavec +docker build --build-arg PG_MAJOR=15 -t myuser/datavec . ``` ### Homebrew @@ -428,7 +428,7 @@ docker build --build-arg PG_MAJOR=15 -t myuser/pgvector . With Homebrew Postgres, you can use: ```sh -brew install pgvector +brew install datavec ``` Note: This only adds it to the `postgresql@14` formula @@ -446,7 +446,7 @@ pgxn install vector Debian and Ubuntu packages are available from the [PostgreSQL APT Repository](https://wiki.postgresql.org/wiki/Apt). Follow the [setup instructions](https://wiki.postgresql.org/wiki/Apt#Quickstart) and run: ```sh -sudo apt install postgresql-15-pgvector +sudo apt install postgresql-15-datavec ``` Note: Replace `15` with your Postgres server version @@ -456,22 +456,22 @@ Note: Replace `15` with your Postgres server version RPM packages are available from the [PostgreSQL Yum Repository](https://yum.postgresql.org/). Follow the [setup instructions](https://www.postgresql.org/download/linux/redhat/) for your distribution and run: ```sh -sudo yum install pgvector_15 +sudo yum install datavec_15 # or -sudo dnf install pgvector_15 +sudo dnf install datavec_15 ``` Note: Replace `15` with your Postgres server version ### conda-forge -With Conda Postgres, install from [conda-forge](https://anaconda.org/conda-forge/pgvector) with: +With Conda Postgres, install from [conda-forge](https://anaconda.org/conda-forge/datavec) with: ```sh -conda install -c conda-forge pgvector +conda install -c conda-forge datavec ``` -This method is [community-maintained](https://github.com/conda-forge/pgvector-feedstock) by [@mmcauliffe](https://github.com/mmcauliffe) +This method is [community-maintained](https://github.com/conda-forge/datavec-feedstock) by [@mmcauliffe](https://github.com/mmcauliffe) ### Postgres.app @@ -479,12 +479,12 @@ Download the [latest release](https://postgresapp.com/downloads.html) with Postg ## Hosted Postgres -pgvector is available on [these providers](https://github.com/pgvector/pgvector/issues/54). +datavec is available on [these providers](https://github.com/datavec/datavec/issues/54). To request a new extension on other providers: - Google Cloud SQL - vote or comment on [this page](https://issuetracker.google.com/issues/265172065) -- DigitalOcean Managed Databases - vote or comment on [this page](https://ideas.digitalocean.com/managed-database/p/pgvector-extension-for-postgresql) +- DigitalOcean Managed Databases - vote or comment on [this page](https://ideas.digitalocean.com/managed-database/p/datavec-extension-for-postgresql) - Heroku Postgres - vote or comment on [this page](https://github.com/heroku/roadmap/issues/156) ## Upgrading @@ -492,20 +492,20 @@ To request a new extension on other providers: Install the latest version and run: ```sql -ALTER EXTENSION vector UPDATE; +ALTER EXTENSION datavec UPDATE; ``` ## Upgrade Notes ### 0.4.0 -If upgrading with Postgres < 13, remove this line from `sql/vector--0.3.2--0.4.0.sql`: +If upgrading with Postgres < 13, remove this line from `sql/datavec--0.3.2--0.4.0.sql`: ```sql -ALTER TYPE vector SET (STORAGE = extended); +ALTER TYPE datavec SET (STORAGE = extended); ``` -Then run `make install` and `ALTER EXTENSION vector UPDATE;`. +Then run `make install` and `ALTER EXTENSION datavec UPDATE;`. ### 0.3.1 @@ -533,22 +533,22 @@ Thanks to: ## History -View the [changelog](https://github.com/pgvector/pgvector/blob/master/CHANGELOG.md) +View the [changelog](https://github.com/datavec/datavec/blob/master/CHANGELOG.md) ## Contributing Everyone is encouraged to help improve this project. Here are a few ways you can help: -- [Report bugs](https://github.com/pgvector/pgvector/issues) -- Fix bugs and [submit pull requests](https://github.com/pgvector/pgvector/pulls) +- [Report bugs](https://github.com/datavec/datavec/issues) +- Fix bugs and [submit pull requests](https://github.com/datavec/datavec/pulls) - Write, clarify, or fix documentation - Suggest or add new features To get started with development: ```sh -git clone https://github.com/pgvector/pgvector.git -cd pgvector +git clone https://github.com/datavec/datavec.git +cd datavec make make install ``` diff --git a/contrib/datavec/sql/datavec--0.1.0--0.1.1.sql b/contrib/datavec/sql/datavec--0.1.0--0.1.1.sql index 1ca2be29e..4387251a5 100644 --- a/contrib/datavec/sql/datavec--0.1.0--0.1.1.sql +++ b/contrib/datavec/sql/datavec--0.1.0--0.1.1.sql @@ -1,5 +1,5 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.1'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.1'" to load this file. \quit CREATE FUNCTION vector_recv(internal, oid, integer) RETURNS vector AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT; diff --git a/contrib/datavec/sql/datavec--0.1.1--0.1.3.sql b/contrib/datavec/sql/datavec--0.1.1--0.1.3.sql index 391835f86..9db8b31d4 100644 --- a/contrib/datavec/sql/datavec--0.1.1--0.1.3.sql +++ b/contrib/datavec/sql/datavec--0.1.1--0.1.3.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.3'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.3'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.1.3--0.1.4.sql b/contrib/datavec/sql/datavec--0.1.3--0.1.4.sql index 56ab0eb50..de133ed2c 100644 --- a/contrib/datavec/sql/datavec--0.1.3--0.1.4.sql +++ b/contrib/datavec/sql/datavec--0.1.3--0.1.4.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.4'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.4'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.1.4--0.1.5.sql b/contrib/datavec/sql/datavec--0.1.4--0.1.5.sql index 3996b2dcd..1d0ebd6f9 100644 --- a/contrib/datavec/sql/datavec--0.1.4--0.1.5.sql +++ b/contrib/datavec/sql/datavec--0.1.4--0.1.5.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.5'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.5'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.1.5--0.1.6.sql b/contrib/datavec/sql/datavec--0.1.5--0.1.6.sql index fdb605b0b..b10063474 100644 --- a/contrib/datavec/sql/datavec--0.1.5--0.1.6.sql +++ b/contrib/datavec/sql/datavec--0.1.5--0.1.6.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.6'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.6'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.1.6--0.1.7.sql b/contrib/datavec/sql/datavec--0.1.6--0.1.7.sql index 35baa3947..52c514882 100644 --- a/contrib/datavec/sql/datavec--0.1.6--0.1.7.sql +++ b/contrib/datavec/sql/datavec--0.1.6--0.1.7.sql @@ -1,5 +1,5 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.7'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.7'" to load this file. \quit CREATE FUNCTION array_to_vector(numeric[], integer, boolean) RETURNS vector AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT ; diff --git a/contrib/datavec/sql/datavec--0.1.7--0.1.8.sql b/contrib/datavec/sql/datavec--0.1.7--0.1.8.sql index c668ad555..5f198b9ae 100644 --- a/contrib/datavec/sql/datavec--0.1.7--0.1.8.sql +++ b/contrib/datavec/sql/datavec--0.1.7--0.1.8.sql @@ -1,5 +1,5 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.1.8'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.1.8'" to load this file. \quit CREATE FUNCTION vector_to_float4(vector, integer, boolean) RETURNS real[] AS 'MODULE_PATHNAME' LANGUAGE C IMMUTABLE STRICT ; diff --git a/contrib/datavec/sql/datavec--0.1.8--0.2.0.sql b/contrib/datavec/sql/datavec--0.1.8--0.2.0.sql index 1ce0d1efd..529155d20 100644 --- a/contrib/datavec/sql/datavec--0.1.8--0.2.0.sql +++ b/contrib/datavec/sql/datavec--0.1.8--0.2.0.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.0'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.0'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.0--0.2.1.sql b/contrib/datavec/sql/datavec--0.2.0--0.2.1.sql index 47606deb3..18320fc09 100644 --- a/contrib/datavec/sql/datavec--0.2.0--0.2.1.sql +++ b/contrib/datavec/sql/datavec--0.2.0--0.2.1.sql @@ -1,5 +1,5 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.1'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.1'" to load this file. \quit DROP CAST (integer[] AS vector); DROP CAST (real[] AS vector); diff --git a/contrib/datavec/sql/datavec--0.2.1--0.2.2.sql b/contrib/datavec/sql/datavec--0.2.1--0.2.2.sql index 697c1408d..92b35521c 100644 --- a/contrib/datavec/sql/datavec--0.2.1--0.2.2.sql +++ b/contrib/datavec/sql/datavec--0.2.1--0.2.2.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.2'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.2'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.2--0.2.3.sql b/contrib/datavec/sql/datavec--0.2.2--0.2.3.sql index 32b07dc22..b1ffbe973 100644 --- a/contrib/datavec/sql/datavec--0.2.2--0.2.3.sql +++ b/contrib/datavec/sql/datavec--0.2.2--0.2.3.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.3'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.3'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.3--0.2.4.sql b/contrib/datavec/sql/datavec--0.2.3--0.2.4.sql index 5d1b34168..8dd5b231c 100644 --- a/contrib/datavec/sql/datavec--0.2.3--0.2.4.sql +++ b/contrib/datavec/sql/datavec--0.2.3--0.2.4.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.4'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.4'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.4--0.2.5.sql b/contrib/datavec/sql/datavec--0.2.4--0.2.5.sql index b372ed0c8..4ba491c4d 100644 --- a/contrib/datavec/sql/datavec--0.2.4--0.2.5.sql +++ b/contrib/datavec/sql/datavec--0.2.4--0.2.5.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.5'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.5'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.5--0.2.6.sql b/contrib/datavec/sql/datavec--0.2.5--0.2.6.sql index e68c1ac03..6403ea096 100644 --- a/contrib/datavec/sql/datavec--0.2.5--0.2.6.sql +++ b/contrib/datavec/sql/datavec--0.2.5--0.2.6.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.6'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.6'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.6--0.2.7.sql b/contrib/datavec/sql/datavec--0.2.6--0.2.7.sql index 227c2171c..7b7e6cff3 100644 --- a/contrib/datavec/sql/datavec--0.2.6--0.2.7.sql +++ b/contrib/datavec/sql/datavec--0.2.6--0.2.7.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.2.7'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.2.7'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.2.7--0.3.0.sql b/contrib/datavec/sql/datavec--0.2.7--0.3.0.sql index 7e62d39e7..257cfb5a4 100644 --- a/contrib/datavec/sql/datavec--0.2.7--0.3.0.sql +++ b/contrib/datavec/sql/datavec--0.2.7--0.3.0.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.3.0'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.3.0'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.3.0--0.3.1.sql b/contrib/datavec/sql/datavec--0.3.0--0.3.1.sql index f1a8fbce5..40bf35645 100644 --- a/contrib/datavec/sql/datavec--0.3.0--0.3.1.sql +++ b/contrib/datavec/sql/datavec--0.3.0--0.3.1.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.3.1'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.3.1'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.3.1--0.3.2.sql b/contrib/datavec/sql/datavec--0.3.1--0.3.2.sql index c3461a103..d3434ed1a 100644 --- a/contrib/datavec/sql/datavec--0.3.1--0.3.2.sql +++ b/contrib/datavec/sql/datavec--0.3.1--0.3.2.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.3.2'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.3.2'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.3.2--0.4.0.sql b/contrib/datavec/sql/datavec--0.3.2--0.4.0.sql index 8b26dd8ed..39218eb07 100644 --- a/contrib/datavec/sql/datavec--0.3.2--0.4.0.sql +++ b/contrib/datavec/sql/datavec--0.3.2--0.4.0.sql @@ -1,5 +1,5 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.4.0'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.4.0'" to load this file. \quit -- remove this single line for Postgres < 13 ALTER TYPE vector SET (STORAGE = extended); diff --git a/contrib/datavec/sql/datavec--0.4.0--0.4.1.sql b/contrib/datavec/sql/datavec--0.4.0--0.4.1.sql index 67ba57ef9..811aebe52 100644 --- a/contrib/datavec/sql/datavec--0.4.0--0.4.1.sql +++ b/contrib/datavec/sql/datavec--0.4.0--0.4.1.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.4.1'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.4.1'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.4.1--0.4.2.sql b/contrib/datavec/sql/datavec--0.4.1--0.4.2.sql index 24abacce0..d09bfcd5a 100644 --- a/contrib/datavec/sql/datavec--0.4.1--0.4.2.sql +++ b/contrib/datavec/sql/datavec--0.4.1--0.4.2.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.4.2'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.4.2'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.4.2--0.4.3.sql b/contrib/datavec/sql/datavec--0.4.2--0.4.3.sql index 3db510e55..e7ac269a3 100644 --- a/contrib/datavec/sql/datavec--0.4.2--0.4.3.sql +++ b/contrib/datavec/sql/datavec--0.4.2--0.4.3.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.4.3'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.4.3'" to load this file. \quit diff --git a/contrib/datavec/sql/datavec--0.4.3--0.4.4.sql b/contrib/datavec/sql/datavec--0.4.3--0.4.4.sql index 49c4ab4ef..890d3cdb0 100644 --- a/contrib/datavec/sql/datavec--0.4.3--0.4.4.sql +++ b/contrib/datavec/sql/datavec--0.4.3--0.4.4.sql @@ -1,2 +1,2 @@ -- complain if script is sourced in psql, rather than via CREATE EXTENSION -\echo Use "ALTER EXTENSION vector UPDATE TO '0.4.4'" to load this file. \quit +\echo Use "ALTER EXTENSION datavec UPDATE TO '0.4.4'" to load this file. \quit diff --git a/contrib/datavec/test/t/001_wal.pl b/contrib/datavec/test/t/001_wal.pl index 46060ede6..4990d4118 100644 --- a/contrib/datavec/test/t/001_wal.pl +++ b/contrib/datavec/test/t/001_wal.pl @@ -72,7 +72,7 @@ $node_replica->init_from_backup($node_primary, $backup_name, $node_replica->start; # Create ivfflat index on primary -$node_primary->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node_primary->safe_psql("postgres", "CREATE EXTENSION datavec;"); $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;" diff --git a/contrib/datavec/test/t/002_vacuum.pl b/contrib/datavec/test/t/002_vacuum.pl index 1c3d71846..f5efa077c 100644 --- a/contrib/datavec/test/t/002_vacuum.pl +++ b/contrib/datavec/test/t/002_vacuum.pl @@ -19,7 +19,7 @@ $node->init; $node->start; # Create table and index -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $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;" diff --git a/contrib/datavec/test/t/003_recall.pl b/contrib/datavec/test/t/003_recall.pl index dddc4d5e0..972229b6c 100644 --- a/contrib/datavec/test/t/003_recall.pl +++ b/contrib/datavec/test/t/003_recall.pl @@ -43,7 +43,7 @@ $node->init; $node->start; # Create table -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $node->safe_psql("postgres", "CREATE TABLE tst (i int4, v vector(3));"); $node->safe_psql("postgres", "INSERT INTO tst SELECT i, ARRAY[random(), random(), random()] FROM generate_series(1, 100000) i;" diff --git a/contrib/datavec/test/t/004_centers.pl b/contrib/datavec/test/t/004_centers.pl index 9c2b53a5a..da24d5739 100644 --- a/contrib/datavec/test/t/004_centers.pl +++ b/contrib/datavec/test/t/004_centers.pl @@ -10,7 +10,7 @@ $node->init; $node->start; # Create table -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $node->safe_psql("postgres", "CREATE TABLE tst (i int4, v vector(3));"); $node->safe_psql("postgres", "INSERT INTO tst SELECT i, '[1,2,3]' FROM generate_series(1, 10) i;" diff --git a/contrib/datavec/test/t/005_query_recall.pl b/contrib/datavec/test/t/005_query_recall.pl index 0e58135a3..b1cff4cab 100644 --- a/contrib/datavec/test/t/005_query_recall.pl +++ b/contrib/datavec/test/t/005_query_recall.pl @@ -10,7 +10,7 @@ $node->init; $node->start; # Create table -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $node->safe_psql("postgres", "CREATE TABLE tst (i int4 primary key, v vector(3));"); $node->safe_psql("postgres", "INSERT INTO tst SELECT i, ARRAY[random(), random(), random()] FROM generate_series(1, 100000) i;" diff --git a/contrib/datavec/test/t/006_lists.pl b/contrib/datavec/test/t/006_lists.pl index eeb11aa3c..778b619d2 100644 --- a/contrib/datavec/test/t/006_lists.pl +++ b/contrib/datavec/test/t/006_lists.pl @@ -10,7 +10,7 @@ $node->init; $node->start; # Create table -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $node->safe_psql("postgres", "CREATE TABLE tst (v vector(3));"); $node->safe_psql("postgres", "INSERT INTO tst SELECT ARRAY[random(), random(), random()] FROM generate_series(1, 100000) i;" diff --git a/contrib/datavec/test/t/007_inserts.pl b/contrib/datavec/test/t/007_inserts.pl index 73d77b58e..5a87c8f8e 100644 --- a/contrib/datavec/test/t/007_inserts.pl +++ b/contrib/datavec/test/t/007_inserts.pl @@ -14,7 +14,7 @@ $node->init; $node->start; # Create table and index -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $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;" diff --git a/contrib/datavec/test/t/008_avg.pl b/contrib/datavec/test/t/008_avg.pl index f03df617d..32a331ed1 100644 --- a/contrib/datavec/test/t/008_avg.pl +++ b/contrib/datavec/test/t/008_avg.pl @@ -10,7 +10,7 @@ $node->init; $node->start; # Create table -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $node->safe_psql("postgres", "CREATE TABLE tst (r1 real, r2 real, r3 real, v vector(3));"); $node->safe_psql("postgres", qq( INSERT INTO tst SELECT r1, r2, r3, ARRAY[r1, r2, r3] FROM ( diff --git a/contrib/datavec/test/t/009_storage.pl b/contrib/datavec/test/t/009_storage.pl index de818c78b..fd1c95eb0 100644 --- a/contrib/datavec/test/t/009_storage.pl +++ b/contrib/datavec/test/t/009_storage.pl @@ -12,7 +12,7 @@ $node->init; $node->start; # Create table -$node->safe_psql("postgres", "CREATE EXTENSION vector;"); +$node->safe_psql("postgres", "CREATE EXTENSION datavec;"); $node->safe_psql("postgres", "CREATE TABLE tst (v1 vector(1024), v2 vector(1024), v3 vector(1024));"); # Test insert succeeds -- Gitee