0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Windows] ローカルのPostgreSQLにpgvectorを追加する

Last updated at Posted at 2024-06-05

pgvectorのインストール&ビルド

  1. x64 Native Tools Command Promptを管理者権限で開く(Winsows検索メニューから検索すると出てくる)

  2. 以下のコマンドを順番に実行

    set "PGROOT=C:\Program Files\PostgreSQL\16"
    cd %TEMP%
    git clone --branch v0.7.1 https://github.com/pgvector/pgvector.git
    cd pgvector
    nmake /F Makefile.win
    nmake /F Makefile.win install
    

    x64 Native Tools Command Promptを管理者権限で開かないと、最後のコマンドが実行できない。

pgvectorをデータベースに適用

  1. SQL Shell(psql) を開く(Winsows検索メニューから検索すると出てくる)
  2. 自分が作ったデータベースを開く
  3. 以下のコマンドを実行
    CREATE EXTENSION vector;
    

これでpgvectorが適用される。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?