pgvector

extension active open-source

A PostgreSQL extension for vector similarity search. pgvector adds vector data types and similarity search operators to PostgreSQL, enabling semantic search without a separate vector database. It supports exact and approximate nearest neighbor search with IVFFlat and HNSW indexes.

Implements

Concepts this tool claims to implement:

  • Vector data type with configurable dimensions. Cosine distance (<=>), L2 distance (<->), and inner product (<#>) operators. IVFFlat and HNSW index types for approximate nearest neighbor search.

  • Combines vector search with PostgreSQL's full SQL capabilities. Join vectors with relational data, filter with WHERE clauses, use existing PostgreSQL features alongside vector search.

  • Embedding secondary

    Stores embedding vectors as native PostgreSQL data type. Does not generate embeddings but provides efficient storage and retrieval.

Integration Surfaces

  • PostgreSQL extension
  • Any PostgreSQL client (psycopg2, pg, etc.)
  • ORMs (SQLAlchemy, Django, ActiveRecord)

Details

Vendor
Andrew Kane (community maintained)
License
PostgreSQL License
Runs On
local, cloud, hybrid
Used By
human, agent, system

Notes

pgvector is ideal for teams already using PostgreSQL who want to add vector search without introducing a new database. Supported by major cloud providers (AWS RDS, Supabase, Neon, etc.). Performance is good for moderate scale but purpose-built vector DBs may be better for billion-scale workloads.