{
  "aliases": [],
  "workflows": [
    "Store document embeddings next to source rows for RAG",
    "Semantic search over product or listing catalogs with metadata filters",
    "Deduplicate records by embedding similarity inside existing SQL pipelines"
  ],
  "advantages": [
    "No separate vector database to operate",
    "Transactions and backups shared with the rest of the data",
    "Permissive license and wide hosting availability"
  ],
  "limitations": [
    "Indexed dimension limits per vector type",
    "Index build time and memory grow with collection size",
    "Filtering plus approximate index can reduce recall without tuning",
    "Single-node scaling tied to the PostgreSQL instance"
  ],
  "prerequisites": [
    "A PostgreSQL server where the extension can be installed or enabled"
  ],
  "audiences": [
    "Developers adding semantic search to Postgres-backed apps",
    "Teams building RAG pipelines"
  ],
  "alternatives": [
    "qdrant",
    "weaviate",
    "chroma",
    "milvus",
    "pinecone",
    "elasticsearch"
  ],
  "tags": [
    "vector-search",
    "embeddings",
    "rag",
    "sql",
    "open-source",
    "postgresql"
  ],
  "use_cases": [
    "build-agents",
    "semantic-search"
  ],
  "operating_systems": [
    "linux",
    "macos",
    "windows"
  ],
  "deployment_models": [
    "on-premises",
    "managed-cloud"
  ],
  "integrations": [
    "PostgreSQL",
    "Supabase",
    "Neon",
    "LangChain",
    "LlamaIndex",
    "Prisma",
    "Drizzle ORM"
  ],
  "data_formats": [
    "SQL",
    "Vector literals (text/binary)"
  ],
  "languages": [
    "SQL",
    "C",
    "Python",
    "JavaScript",
    "Ruby",
    "Go",
    "Rust",
    "Java"
  ],
  "self_hostable": true,
  "discovery_method": "editorial-research",
  "depth": "deep",
  "editorial_status": "reviewed",
  "visibility": "public",
  "featured": false,
  "author": "batch-D",
  "slug": "pgvector",
  "name": "pgvector",
  "vendor": {
    "name": "Andrew Kane (pgvector project)",
    "slug": "pgvector-project",
    "website": "https://github.com/pgvector/pgvector"
  },
  "homepage_url": "https://github.com/pgvector/pgvector",
  "docs_url": "https://github.com/pgvector/pgvector#readme",
  "repo_url": "https://github.com/pgvector/pgvector",
  "license_url": "https://github.com/pgvector/pgvector/blob/master/LICENSE",
  "product_type": "extension",
  "product_status": "active",
  "summary": "PostgreSQL extension adding vector types, distance operators and HNSW/IVFFlat indexes for similarity search inside the database",
  "description": "pgvector is an open-source PostgreSQL extension, written in C and maintained by Andrew Kane, that adds vector data types and similarity search to a standard PostgreSQL server. It is distributed under the PostgreSQL License and is preinstalled or installable on most managed PostgreSQL services, which has made it the usual way to add embedding search to an application that already stores its data in Postgres.\n\nThe extension defines column types for dense single-precision and half-precision vectors, binary vectors and sparse vectors, together with distance operators for Euclidean, inner-product, cosine, taxicab, Hamming and Jaccard distance. Queries use ordinary SQL: an ORDER BY on a distance expression with a LIMIT returns the nearest neighbors, and WHERE clauses filter on any other column in the same statement. Without an index results are exact; adding an HNSW or IVFFlat index trades some recall for speed on large tables, with tuning parameters exposed as index options and session settings.\n\nTypical use is retrieval-augmented generation: embeddings produced by a model API are written next to the source text, and the application joins vector similarity with metadata filters, full-text search or access-control predicates in one query, then hands the rows to an LLM. Client support comes for free from existing PostgreSQL drivers, and helper packages exist for Python, Node, Ruby, Go and others.\n\nThe limits follow from living inside Postgres: index builds and memory use grow with table size, the indexed dimension count is capped per type, and very large or latency-critical collections may be better served by a dedicated vector engine or by partitioning. Recall under heavy filtering depends on index parameters and PostgreSQL version.",
  "capabilities": [
    "vector, halfvec, bit and sparsevec column types",
    "L2, inner product, cosine, L1, Hamming and Jaccard distance operators",
    "Exact search via ORDER BY plus approximate HNSW and IVFFlat indexes",
    "Combine similarity with SQL filters, joins and full-text search",
    "Works with any PostgreSQL driver; helper libraries for many languages",
    "Available on major managed PostgreSQL services"
  ],
  "comparison_notes": "Qdrant, Weaviate, Milvus and Chroma are standalone vector engines with their own storage, APIs and scaling models; pgvector instead extends an existing PostgreSQL database and uses plain SQL. Pinecone is a proprietary managed service with no self-hosted option. Elasticsearch and OpenSearch add vector fields to a full-text search engine. The usual trade-off is operational simplicity and transactional consistency with pgvector against specialized indexing features and horizontal scaling in dedicated systems.",
  "categories": [
    {
      "slug": "vector-databases",
      "primary": true
    },
    {
      "slug": "relational-databases"
    },
    {
      "slug": "embeddings-vector-search"
    }
  ],
  "execution_modes": [
    "self-hosted",
    "cloud"
  ],
  "interfaces": [
    "library",
    "api"
  ],
  "source_model": "open-source",
  "license_spdx": "PostgreSQL",
  "pricing_model": [
    "open-source",
    "free"
  ],
  "sources": [
    {
      "url": "https://github.com/pgvector/pgvector",
      "type": "official_site",
      "supports": [
        "name",
        "summary",
        "capabilities",
        "languages"
      ],
      "checked_at": "2026-11-02",
      "title": "pgvector/pgvector – Open-source vector similarity search for Postgres",
      "note": "Project README is the primary documentation"
    },
    {
      "url": "https://github.com/pgvector/pgvector",
      "type": "repository",
      "supports": [
        "repo_url",
        "product_status"
      ],
      "checked_at": "2026-11-02",
      "title": "pgvector repository"
    },
    {
      "url": "https://github.com/pgvector/pgvector/blob/master/LICENSE",
      "type": "license_page",
      "supports": [
        "license_spdx",
        "source_model"
      ],
      "checked_at": "2026-11-02",
      "title": "pgvector LICENSE (PostgreSQL License)"
    }
  ],
  "confidence": "high"
}
