// troubleshooting guide · pgvector
pgvector "operator does not exist: vector <=>" Error
- Status
- Fixed in latest version
- platforms:
- Postgres, Python, ORMs
- updated:
- November 15, 2026
- reports:
- 4
- Method
- how we research
RUNBOOK · pgvector/operator-does-not-exist-vector3 FIXES
// quick answer
The operator needs a vector on both sides. Cast the query parameter to vector or register the driver adapter.
Most likely fix: Cast in SQL
How to fix it
// try these in order, the most common fix is first
FIX 1Cast in SQL
- 01Write embedding <=> $1::vector
- 02Or CAST($1 AS vector)
Did this fix it?FIX 2Python
- 01Call register_vector(conn) from pgvector-python right after connecting
- 02Convert numpy arrays with .tolist() for psycopg2
Did this fix it?FIX 3Match types
- 01If the column is halfvec cast the query to halfvec
- 02Compare vector with vector
Did this fix it?
Symptoms
operator does not exist: vector <=> unknown (or real[], numeric[]).
Why it happens
- C-01Untyped query parameter
- C-02Plain array passed from a driver or ORM
- C-03halfvec column queried with vector
- C-04numpy array not converted
// this guide also covers
- operator does not exist vector <=>
- operator does not exist vector <=> unknown
- pgvector cast to vector
Still not working?
If pgvector keeps failing, you're not alone. See every pgvector problem users report or the alternatives people switch to.
Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.
Talk to usThe same problem in other apps
Other pgvector errors
- pgvector Error: extension "vector" is not available
- pgvector HNSW Index Build Slow
- pgvector Dimension Limit: Cannot Index More Than 2000 Dimensions
- pgvector "different vector dimensions" Error
- pgvector Query Returns Fewer Results Than LIMIT With Filter
- pgvector Index Not Being Used
- pgvector HNSW Build Out of Memory or Shared Memory Error
- How to Enable pgvector on Supabase