The VectorDistance function requires two input tables: target, which contains the target vectors, and ref, which contains the reference vectors.
VectorDistance Target Input Table Schema
Column Name |
Data Type |
Description |
target_id_column
|
Any |
Column that is, or is part of, the target vector identifier. The vector identifier can have multiple columns. |
feature
|
Any except BYTEA |
Feature name of the vector. |
value
|
SMALLINT, INTEGER, BIGINT, NUMERIC, or DOUBLE PRECISION |
Value of the feature. |
VectorDistance Reference Input Table Schema
Column Name |
Data Type |
Description |
ref_id_column
|
Any |
Column that is, or is part of, the reference vector identifier. The vector identifier can have multiple columns. |
feature
|
Any except BYTEA |
Feature name of the vector. |
value
|
SMALLINT, INTEGER, BIGINT, NUMERIC, or DOUBLE PRECISION |
Value of the feature. |