mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Moved sql and test files
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"provides": {
|
||||
"vector": {
|
||||
"file": "vector--0.1.1.sql",
|
||||
"file": "sql/vector--0.1.1.sql",
|
||||
"docfile": "README.md",
|
||||
"version": "0.1.2",
|
||||
"abstract": "Open-source vector similarity search for Postgres"
|
||||
|
||||
9
Makefile
9
Makefile
@@ -1,11 +1,12 @@
|
||||
EXTENSION = vector
|
||||
DATA = vector--0.1.1.sql vector--0.1.0--0.1.1.sql
|
||||
DATA = sql/vector--0.1.1.sql sql/vector--0.1.0--0.1.1.sql
|
||||
MODULE_big = vector
|
||||
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 sql/*.sql)
|
||||
TESTS = $(wildcard test/sql/*.sql)
|
||||
|
||||
REGRESS = btree cast copy functions ivfflat_cosine ivfflat_ip ivfflat_l2 ivfflat_unlogged vector
|
||||
REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS))
|
||||
REGRESS_OPTS = --inputdir=test
|
||||
|
||||
OPTFLAGS = -march=native
|
||||
|
||||
@@ -26,7 +27,7 @@ include $(PGXS)
|
||||
|
||||
prove_installcheck:
|
||||
rm -rf $(CURDIR)/tmp_check
|
||||
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
|
||||
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),test/t/*.pl)
|
||||
|
||||
.PHONY: dist
|
||||
|
||||
|
||||
10
README.md
10
README.md
@@ -214,16 +214,10 @@ make prove_installcheck # TAP tests
|
||||
To run single tests:
|
||||
|
||||
```sh
|
||||
make installcheck REGRESS=vector # regression test
|
||||
make prove_installcheck PROVE_TESTS=t/001_wal.pl # TAP test
|
||||
make installcheck REGRESS=vector # regression test
|
||||
make prove_installcheck PROVE_TESTS=test/t/001_wal.pl # TAP test
|
||||
```
|
||||
|
||||
Directories
|
||||
|
||||
- `expected` - expected output for regression tests
|
||||
- `sql` - regression tests
|
||||
- `t` - TAP tests
|
||||
|
||||
Resources for contributors
|
||||
|
||||
- [Extension Building Infrastructure](https://www.postgresql.org/docs/current/extend-pgxs.html)
|
||||
|
||||
17
test/expected/ivfflat_options.out
Normal file
17
test/expected/ivfflat_options.out
Normal file
@@ -0,0 +1,17 @@
|
||||
SET client_min_messages = warning;
|
||||
CREATE EXTENSION IF NOT EXISTS vector;
|
||||
SET enable_seqscan = off;
|
||||
CREATE TABLE t (val vector(3));
|
||||
CREATE INDEX ON t USING ivfflat (val) 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);
|
||||
ERROR: value 32769 out of bounds for option "lists"
|
||||
DETAIL: Valid values are between "1" and "32768".
|
||||
SHOW ivfflat.probes;
|
||||
ivfflat.probes
|
||||
----------------
|
||||
1
|
||||
(1 row)
|
||||
|
||||
DROP TABLE t;
|
||||
Reference in New Issue
Block a user