pg_ivfflat
pg_ivfflat · Experimental pgrx extension providing a Vector type and an in-memory IVFFlat index access method.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100895 | pg_ivfflat | pg_ivfflat | 0.1.0 | RAG | Unknown | Rust |
PostgreSQL · 17
Usage
Sources:
- Official repository README
- PostgreSQL extension implementation
- Vector type implementation
- Distance operator implementation
pg_ivfflat 0.1.0 is an experimental pgrx project intended to explore an IVFFlat index access method. The pinned PostgreSQL extension does not actually register an index access method: it provides a custom vector type and a cosine-distance operator only. Do not confuse this API with pgvector or assume the package name means an IVFFlat index is available.
Available Workflow
The vector(n) type stores JSON-array input as float8 values and enforces dimensions in the range 1–65,535 when a type modifier is present. Its text output is a compact JSON array. <=> accepts two vectors and returns cosine distance as double precision.
Experimental Boundaries
There is no CREATE INDEX ... USING ivfflat workflow, operator class, lists option, probes setting, or approximate-nearest-neighbor path in this source snapshot. The query above is an ordinary sort after evaluating distance for rows; confirm plans with EXPLAIN and expect full-table work.
The Cargo manifest enables only PostgreSQL 17 and uses pgrx 0.12.9. The generic names vector and <=> overlap APIs used by other vector extensions, so installing them in the same schema can conflict. The standalone ivfflat Rust crate in the repository is an in-memory experiment and is not exposed as a PostgreSQL index here. Treat this revision as development code, not a production vector-search implementation.