Installing pgvector
===================

``pgvector``
は、使用しているPostgresディストリビューションと同じプラットフォームでサポートされています。
``pgvector`` のサポートはPostgres
13から始まります。詳細については、以下を参照してください。

- `EDB Postgres Advanced Server Product Compatibility <https://www.enterprisedb.com/platform-compatibility#epas>`_ 

- `PostgreSQL Product Compatibility <https://www.enterprisedb.com/resources/platform-compatibility#pg>`_ 

- `EDB Postgres Extended Server Product Compatibility <https://www.enterprisedb.com/resources/platform-compatibility#epas_extended>`_ 

インストール
------------

インストールプロセスを開始する前に

- Postgresをインストールします。参照

- :ref:`Installing EDB Postgres Advanced Server <Installing pgvector>` 

- `Installing PostgreSQL <https://www.postgresql.org/download/>`_ 

- :ref:`Installing EDB Postgres Extended Server <Installing pgvector>` 

- リポジトリの設定をします。

リポジトリのセットアップは1回限りのタスクです。すでにリポジトリを設定している場合、この手順を実行する必要はありません。

リポジトリを設定するには、
`EDB repositories <https://www.enterprisedb.com/repos-downloads>`_ に移動し、そこに提供されている指示に従ってください。

パッケージをインストールする
----------------------------

Package installコマンドの構文は次のとおりです。

.. code:: shell


   #  For SLES, CentOS, RHEL and its derivatives

   sudo <package-manager> -y install edb-<postgres><postgres_version>-pgvector0

   #  For Debian and Ubuntu

   sudo <package-manager> -y install edb-<postgres><postgres_version>-pgvector-0

そこで

- ``<package-manager>``
  は、オペレーティングシステムで使用されるパッケージマネージャーです。

.. csv-table::
  :header: Package manager,Operating system
  :widths: 20,20
  :align: left
  :class: longtable

  dnf,RHEL 8/9 and derivatives
  yum,"RHEL 7 and derivatives, CentOS 7"
  zypper,SLES
  apt-get,Debian and derivatives

- ``<postgres>`` は、使用しているPostgresのディストリビューションです。

.. csv-table::
  :header: Postgres distribution,Value
  :widths: 20,20
  :align: left
  :class: longtable

  PostgreSQL,pg
  EDB Postgres Advanced Server,as
  EDB Postgres Extended Server,postgresextended

- ``<postgres_version>`` は、使用しているPostgresのバージョンです。

たとえば、RHEL 8プラットフォームにEDB Postgres Advanced Server
15のpgvectorをインストールするには

.. code:: shell

   sudo dnf -y install edb-as15-pgvector0
