After installing the pgvector package, enable the extension in each database where you want to use it. After upgrading the package, run a one-time update command to apply any extension changes.
Enabling the extension
After installing the package, enable pgvector in each database where you want to use it:
CREATE EXTENSION vector;
Note for EPAS users
On EDB Postgres Advanced Server, you must connect as a superuser or a user with the CREATE privilege on the database to run CREATE EXTENSION. The enterprisedb superuser can run this command by default.
To verify the installation:
SELECT extversion FROM pg_extension WHERE extname = 'vector';
Upgrading the extension
Upgrade the
pgvectorpackage using your system package manager:sudo dnf upgrade edb-<postgres><postgres_version>-pgvector0
sudo zypper upgrade edb-<postgres><postgres_version>-pgvector0
sudo apt-get upgrade edb-<postgres><postgres_version>-pgvector-0
Replace
<postgres>and<postgres_version>with your distribution and version. For example, to upgrade pgvector for EDB Postgres Advanced Server 17 on RHEL:sudo dnf upgrade edb-as17-pgvector0Run the following in each database where the extension is installed:
ALTER EXTENSION vector UPDATE;
After enabling the extension, see Using pgvector to start storing and querying vector data.