---
title: "Supabase Vecs: a vector client for Postgres"
description: "Vecs is a Python client that makes Postgres with the pgvector extension behave like a dedicated vector store, handling collection (table) creation, indexing, upserts, and similarity queries by cosine, L2, or max inner product with a jsonb-backed metadata filter DSL."
url: "https://swe.quest/articles/supabase-vecs-a-vector-client-for-postgres-06f6cf65595a4da8"
canonical: "https://supabase.com/blog/vecs"
source: "Supabase"
published: "2023-05-29"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["vector-search","postgres","python"]
---

# Supabase Vecs: a vector client for Postgres

A post on [Supabase](https://swe.quest/sources/supabase.md), published 2023-05-29, 4 min read, Announcement. Original: [https://supabase.com/blog/vecs](https://supabase.com/blog/vecs)

## Summary

Vecs is a Python client that makes Postgres with the pgvector extension behave like a dedicated vector store, handling collection (table) creation, indexing, upserts, and similarity queries by cosine, L2, or max inner product with a jsonb-backed metadata filter DSL. Each collection maps to a plain table in a \`vecs\` schema (text id, vector column, jsonb metadata), so users can drop down to SQL when needed. On Supabase, collections can be exposed as public views and queried from supabase-js. Possible future work includes built-in text/image embedding transforms and an async client.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- vector embeddings ([easy posts on RAG & retrieval](https://swe.quest/tags/rag.md?difficulty=easy))
- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))

## Keywords

vecs, pgvector, Supabase, PostgreSQL, supabase-js

## Related posts

- [Hugging Face is now supported in Supabase](https://swe.quest/articles/hugging-face-is-now-supported-in-supabase-b922ce506c4fa31d.md): Supabase · 2023-08-07 · Medium · 7 min read · Vector search, PostgreSQL, Serverless, Python, JavaScript
  Supabase adds first-class Hugging Face support for generating embeddings stored in pgvector, as an open-source, self-hostable alternative to OpenAI's text-embedding-ada-002.
- [Introducing Vector Buckets](https://swe.quest/articles/introducing-vector-buckets-dbf3248011e75bdf.md): Supabase · 2025-12-01 · Medium · 7 min read · Vector search, PostgreSQL, Storage systems
  Supabase Vector Buckets are a new Storage bucket type that keeps embeddings in S3-backed object storage with built-in k-NN similarity search, supporting up to 50M vectors per index, cosine distance and metadata filtering.
- [ChatGPT plugins now support Postgres & Supabase](https://swe.quest/articles/chatgpt-plugins-now-support-postgres-supabase-db9d10a95a8d96b9.md): Supabase · 2023-05-25 · Medium · 7 min read · RAG & retrieval, Vector search, PostgreSQL, LLMs
  Supabase contributed Postgres and Supabase datastore providers to OpenAI's ChatGPT Retrieval Plugin, storing text-embedding-ada-002 embeddings in pgvector.
- [Storing OpenAI embeddings in Postgres with pgvector](https://swe.quest/articles/storing-openai-embeddings-in-postgres-with-pgvector-19a5d03614f86fc6.md): Supabase · 2023-02-06 · Medium · 11 min read · Vector search, PostgreSQL, RAG & retrieval, LLMs
  pgvector adds a vector data type and distance operators (Euclidean \<-\>, negative inner product \<#\>, cosine \<=\>) to Postgres, so OpenAI text-embedding-ada-002 embeddings (1536 dimensions) can be stored and queried for similarity directly in the database.
- [How to Use pgvector for Similarity Search on Heroku Postgres](https://swe.quest/articles/how-to-use-pgvector-for-similarity-search-on-heroku-postgres-c4879269328732cd.md): Heroku Engineering · 2023-11-16 · Medium · 5 min read · Vector search, PostgreSQL, Python
  Heroku Postgres now supports the pgvector extension on Standard-tier and higher databases running Postgres 15, enabled with \`CREATE EXTENSION vector;\`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
