pgv
Minimal vector extension
pgv · Minimal vector extension
Overview
Usage
Sources:
- Official upstream README
- Official extension control file (pgv.control)
- Official extension SQL (pgv–0.0.1.sql)
pgv — Learning how postgres extensions work based on pgvector and postgresql extension. Use it for the corresponding vector, model, or retrieval workflow. Use the pinned upstream revision linked above as the API boundary and test it on the target PostgreSQL build.
Core Workflow
Install the extension in the intended database, run the smallest upstream example above when available, and verify the installed version and returned values before integrating it into application SQL.
Important Objects
vec_cmp(vec, vec)is an extension function and returnsinteger.vec_cosine_distance(vec, vec)is an extension function and returnsfloat4.vec_eq(vec, vec)is an extension function and returnsboolean.vec_ge(vec, vec)is an extension function and returnsboolean.vec_gt(vec, vec)is an extension function and returnsboolean.vec_input(cstring, oid, integer)is an extension function and returnsvec.vec_le(vec, vec)is an extension function and returnsboolean.vec_lt(vec, vec)is an extension function and returnsboolean.vec_ne(vec, vec)is an extension function and returnsboolean.vec_output(vec)is an extension function and returnscstring.vec_typemodifier_in(cstring[])is an extension function and returnsinteger.vec_typemodifier_out(integer)is an extension function and returnscstring.vecis an extension-defined type.vec_opsis an extension-defined operator class.
Requirements and Caveats
- The reviewed control file declares default version
0.0.1. - The control file marks the extension as relocatable.
- Confirm privileges, supported PostgreSQL versions, upgrade behavior, and failure cases against the pinned source before production use.