Was this helpful?
Vector Data Type
In SQL, the type definition of an Vector is in the form Vector (<dimension>, <coordinate type>). A Vector value is a fixed number of numeric values (coordinates) of a specific numeric type. The number of coordinates is the dimension, and the numeric type of those coordinates is the coordinate type. Both are mandatory parameters to the Vector type.
For example, a value of type VECTOR(10, FLOAT4) is a Vector of 10 coordinates of type FLOAT4.
You can use this in a CREATE TABLE statement as follows:
CREATE TABLE myfloatvectortable (v1 VECTOR(10, FLOAT4));
A Vector value itself may be NULL, but the individual coordinates may not be NULL.
A non-NULL Vector value always consists of exactly the number of coordinates specified by the dimension.
The coordinate type may be any non-nullable numeric type supported by SQL: integer, floating-point or DECIMAL If the coordinate type is DECIMAL, the precision and scale must be specified as usual, for example VECTOR(10, DECIMAL(6, 3)).
Last modified date: 09/11/2026