Commit graph

5 commits

Author SHA1 Message Date
ruvnet
7c5f6c9349 fix(postgres): register embedding functions in the 0.3.0 extension SQL
`sql/ruvector--0.3.0.sql` only carried a comment stub for the embedding
functions, so ruvector_embed() and friends were never created even in builds
compiled with `--features embeddings`.

Register all ten (#[pg_extern] in src/embeddings/functions.rs) inside the
same `DO $$ ... EXCEPTION WHEN OTHERS THEN RAISE NOTICE` guard the solver,
math and TDA sections use, so CREATE EXTENSION still succeeds on builds
without the feature. Declarations mirror the Rust signatures, including the
7-column ruvector_embedding_models() table and pgrx's default volatility;
#136's original block predates both and declared 4 columns.

Checked on postgres:17 (no library) and the published
ruvector-postgres:2.0.6-pg17 image (library without the embeddings feature):
both run the block with the skip NOTICE and exit 0.

Remaining part of #136; its control-file and Dockerfile halves are already
on main (4d02cc223, 229877fe9).

Co-Authored-By: John O'Hare <github@xrsystems.uk>
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-10 05:14:07 -05:00
rUv
87399fa741
fix(postgres): wrap optional-feature SQL functions in DO exception blocks (#485)
`CREATE EXTENSION ruvector` was failing when the extension was built
without optional feature flags (solver, math-distances, tda,
attention-extended, sona-learning, domain-expansion) because the SQL
migration unconditionally registered C functions whose symbols didn't
exist in the compiled .so file.

Wrap all 6 optional-feature sections in DO $ BEGIN ... EXCEPTION WHEN
OTHERS THEN RAISE NOTICE ... END $ blocks so PostgreSQL gracefully skips
missing C function symbols and logs an informational notice instead of
aborting the entire extension load.

Fixes #325

Co-authored-by: ruvnet <ruvnet@gmail.com>
2026-05-22 01:03:20 -04:00
rUv
d197223221 fix: ruvector-postgres v0.3.2 — 100% audit pass (HNSW + hybrid fixes) (#230)
HNSW k-NN fix:
- Search beam width (k) increased from 10 to 100 — previous value
  starved the beam search, causing 0 rows on index scan
- Added ruvector_hnsw_debug() diagnostic function for troubleshooting
- Added warning log when entry_point is InvalidBlockNumber

Hybrid search fix:
- ruvector_hybrid_search() now returns success=true with empty results
  and helpful message on unregistered collections (was success=false)

Audit script fix:
- Corrected hybrid_search argument order in sql-audit-v3.sql Section 9b
- Added HNSW debug diagnostics on 0-row failure

Results: 17 PASS / 0 PARTIAL / 0 FAIL → 100% (up from 88%)
Published: docker.io/ruvnet/ruvector-postgres:0.3.2
2026-03-03 13:21:48 -05:00
rUv
229877fe9a fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227)
Fixes #226
2026-03-03 12:53:10 -05:00
rUv
4d02cc2234 feat: add 43 new SQL functions in ruvector-postgres v0.3.0 (ADR-044)
Integrate 5 workspace crates (ruvector-solver, ruvector-math,
ruvector-attention, sona, ruvector-domain-expansion) as 6 feature-gated
modules exposing solver, math distances, TDA, extended attention, Sona
learning, and domain expansion — bringing total to 143 SQL functions.
Docker image verified with all functions passing.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-02-21 20:38:43 +00:00