Skip to content
All terms
Postgres

pgvector

pgvector is a Postgres extension that adds the vector data type, distance operators (cosine similarity <=>, L2 distance <->, inner product <#>), and indexing strategies (IVFFlat from day one, HNSW from 0.5).

Why it matters: vector search no longer needs a second database. Your RAG embeddings sit next to your business data; joins between a top-K vector search and a tenant filter are one SQL query. Performance reached parity with dedicated vector DBs around 2024, and the operational simplicity hasn't been matched.

Enable it on Supabase with CREATE EXTENSION vector; or through the Studio Extensions panel. The same syntax works on Neon, RDS, and self-hosted Postgres 14+.

Read further