{ "name": "pgvector", "version": "0.8.7", "summary": "pgvector: vector similarity search for PostgreSQL (the extension vector: vector, halfvec and sparsevec types, distances, HNSW and IVFFlat indexes)", "category": "library", "license": "PostgreSQL", "homepage": "https://github.com/pgvector/pgvector", "source": { "url": "https://github.com/pgvector/pgvector/archive/refs/tags/v0.8.7.tar.gz", "sha256": "cac0b10c360f05b2d521200105ba3697e773d4cd3731f5a915a7e37ebe0bea85" }, "watch": { "kind": "github-tag", "repo": "pgvector/pgvector", "tag_regex": "^v([0-9]+\\.[0-9]+\\.[0-9]+)$" }, "deps": [ "postgresql" ], "env_packages": [], "static": false, "nss": false, "check": "[ -s share/doc/pgvector/LICENSE ] && t=$(mktemp -d) && chmod 755 \"$t\" && chown 65534:65534 \"$t\" && p=$(free_port) && u() { setpriv --reuid=65534 --regid=65534 --clear-groups \"$@\"; } && u bin/initdb -D \"$t/data\" -U bvs --auth=trust -E UTF8 --locale-provider=builtin --builtin-locale=C.UTF-8 --no-instructions > \"$t/initdb.log\" 2>&1 && up=1 && u bin/pg_ctl -D \"$t/data\" -l \"$t/pg.log\" -w -t 180 -o \"-p $p -k $t -c listen_addresses=\" start > /dev/null 2>&1 && q() { bin/psql -X -q -v ON_ERROR_STOP=1 -At -h \"$t\" -p \"$p\" -U bvs \"$@\"; } && [ \"$(q -d postgres -c 'CREATE EXTENSION vector' -c \"SELECT extversion FROM pg_extension WHERE extname = 'vector'\")\" = 0.8.7 ] && q -d postgres -c 'CREATE TABLE items (id int PRIMARY KEY, e vector(3))' -c \"INSERT INTO items VALUES (1, '[1,2,3]'), (2, '[4,5,6]'), (3, '[1,2,4]')\" -c 'CREATE INDEX ON items USING hnsw (e vector_l2_ops)' && [ \"$(q -d postgres -c 'SET enable_seqscan = off' -c \"SELECT string_agg(id::text, ',' ORDER BY e <-> '[1,2,3]') FROM (SELECT id, e FROM items ORDER BY e <-> '[1,2,3]' LIMIT 2) s\")\" = 1,3 ] && [ \"$(q -d postgres -c \"SELECT '[1,2,3]'::halfvec(3) <=> '[2,4,6]'::halfvec(3)\")\" = 0 ] && u bin/pg_ctl -D \"$t/data\" -m fast -w -t 180 stop > /dev/null 2>&1 && up=; r=$?; [ -n \"${up:-}\" ] && u bin/pg_ctl -D \"$t/data\" -m immediate -w stop > /dev/null 2>&1; [ $r = 0 ] || cat \"$t/initdb.log\" \"$t/pg.log\" >&2 2> /dev/null; rm -rf -- \"${t:?}\"; [ $r = 0 ] && echo \"pgvector 0.8.7: CREATE EXTENSION vector in PostgreSQL $(bin/postgres --version | awk '{print $3}') as uid 65534, a nearest-neighbour query through an HNSW index, halfvec's cosine distance\"; exit $r" }