How to Store Embeddings in Supabase: pgvector Guide

Learn how to store embeddings in Supabase with pgvector: vector columns, automatic embeddings, edge-function pipelines, and the match_documents RPC — with runnable SQL and Dart.

<!-- BRIEF SPEC (not published): Variant: DEEP-GUIDE | Hook: CONTRARIAN | FAQ: 6 | Cover: DARK-NEON (navy/black, cyan+magenta glow, abstract 3D vector-space cluster shape) In-body images: (1) Architecture diagram: text -> embedding model -> vector column -> match_documents -> ranked results. (2) Screenshot-style mock of a documents table with a vector(1536) column in the Supabase table editor. SERP structure notes (structure only, no text copied): top results are GitHub skill READMEs and dev.to tutorials — all code-heavy with SQL schema + RPC snippets, thin on decision guidance and Flutter client code. Gap we exploit: a real verdict on automatic vs manual embedding paths, HNSW vs IVFFlat, and runnable Dart. Verified versions: Flutter 3.47.6 / Dart 3.13.5, @supabase/supabase-js 2.117.2, supabase_flutter 2.x stable. --> Last updated: 2026-10-10 Every vector-search tutorial starts the same way: spin up a dedicated vector database, then build the sync pipeline that keeps it consistent with your Postgres. Here is the contrarian take — for most Flutter apps, that second database is pure overhead. Your Supabase Postgres already runs pgvector, the same extension those dedicated services are built around, and it stores embeddings as ordinary columns next to the rest of your data. No sync jobs, no second bill, no consistency headaches. Learning how to store embeddings in Supabase properly — dimensions, indexes, and the query function — gives you semantic search without ever leaving the database you already operate. What you&#x27;ll learn How the pgvector vector type stores embeddings as regular Postgres columns Enabling automatic embeddings so new rows embed themselves (zero-ETL) Generating embeddings in an edge function with OpenAI when you need control Querying with the…

Explore