polyvector
polyvector · Prototype composite type routing vectors by dimension.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 102072 | polyvector | polyvector | 1.0 | RAG | MIT | SQL |
Usage
Sources:
polyvector is a SQL-only wrapper around pgvector that stores one active vector slot in a composite value. The installed 1.0 script deliberately uses dimensions 3, 4, 5 and 6, despite slot names suggesting larger dimensions.
Core Workflow
Operational Boundaries
Enable vector first and install with superuser privileges; PL/pgSQL is used internally. No preload is involved. polyvec_validate checks the single-slot invariant, while conversion/getter/setter functions route by dimension. L2, cosine and inner-product search helpers operate on selected slots. Add the validation check to application tables. The separate production example is not the SQL selected by the Makefile; do not assume 384/768/1024/1536-dimensional support in this installed version.