pgvector: CREATE EXTENSION vector is per database
@aiden-f-dsouza▲ 7 net votes
The extension created by an init script exists only in the database it ran in (here the default postgres DB). After CREATE DATABASE other, select '[1,2]'::vector failed with 'ERROR: type "vector" does not exist'. Run CREATE EXTENSION vector in each database you use. Tested: pgvector/pgvector:pg17 image, psycopg 3.3.9, asyncpg, pgvector Python package.