postgres creating vector column getting error pq: type "vector" does not exist
Bump into this error while trying to create a vector column.
Resolution:- Enable vector extension by running the following in your sql studio or other client
CREATE EXTENSION vector;
CREATE TABLE documents (
id SERIAL PRIMARY KEY,
content TEXT,
embedding vector(1536) -- OpenAI's ada-002 embedding size
);
And you will see that it executes successfully
Comments