// 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
Share

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

  1. FIX 1Cast in SQL

    1. 01Write embedding <=> $1::vector
    2. 02Or CAST($1 AS vector)
    Did this fix it?
  2. FIX 2Python

    1. 01Call register_vector(conn) from pgvector-python right after connecting
    2. 02Convert numpy arrays with .tolist() for psycopg2
    Did this fix it?
  3. FIX 3Match types

    1. 01If the column is halfvec cast the query to halfvec
    2. 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 us

Watch pgvector Get an email when its price changes, it has an outage, or we publish a new fix. No spam.

Fixed it? Share this guide

The same problem in other apps

All not loading, error messages & connection guides →

Other pgvector errors

All 11 pgvector errors and fixes →