FG
💻 Software🤖 AI & LLMs

vector_eq raises ERROR instead of returning FALSE. Is that intended behavior?

Freshabout 2 years ago
Mar 14, 20260 views
Confidence Score87%
87%

Problem

Hi all, vector_eq() calls CheckDims() first, raising an ERROR if the compared vectors have different sizes. Since pg_vector supports vectors of variable size, this causes problems. In this case, vector_eq() should return FALSE, not throw an ERROR. This also throws ERRORs when doing a VACUUM ANALYZE. Is that intended behavior? best regards Ernst-Georg

Error Output

ERROR if the compared vectors have different sizes. Since pg_vector supports vectors of variable size, this causes problems. In this case, vector_eq() should return FALSE, not throw an ERROR. This also thro

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: vector_eq raises ERROR instead of returning FALSE. Is that intended behavior?

Low Risk

This change will be made in 0.7.0 (as mentioned above). I'd prefer not to make breaking changes in patch versions unless absolutely necessary, and I don't think this meets that criteria.

84

Trust Score

2 verifications

100% success
  1. 1

    This change will be made in 0.7.0 (as mentioned above). I'd prefer not to make b

    This change will be made in 0.7.0 (as mentioned above). I'd prefer not to make breaking changes in patch versions unless absolutely necessary, and I don't think this meets that criteria.

Validation

Resolved in pgvector/pgvector GitHub issue #451. Community reactions: 1 upvotes.

Verification Summary

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

pgvectorembeddingsvector-search