Skip to content

Latest commit

 

History

History
63 lines (45 loc) · 1.76 KB

DEVELOPMENT.md

File metadata and controls

63 lines (45 loc) · 1.76 KB

Setup your pgvectorscale developer environment

You build pgvectorscale from source, then integrate the extension into each database in your PostgreSQL environment.

pgvectorscale prerequisites

To create a pgvectorscale developer environment, you need the following on your local machine:

  • PostgreSQL v16

  • pgvector

  • Development packages:

    sudo apt-get install make gcc pkg-config clang postgresql-server-dev-16 libssl-dev
    
  • Rust:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  • Cargo-pgrx:

    cargo install --locked cargo-pgrx

    You must reinstall cargo-pgrx whenever you update Rust, cargo-pgrx must be built with the same compiler as pgvectorscale.

  • The pgrx development environment:

    cargo pgrx init --pg16 pg_config

Build and install pgvectorscale on your database

  1. In Terminal, clone this repository and switch to the extension subdirectory:

    git clone https://github.com/timescale/pgvectorscale && \
    cd pgvectorscale/pgvectorscale
  2. Build pgvectorscale:

    cargo pgrx install --release
  3. Connect to the database:

    psql -d "postgres://<username>@<password>:<port>/<database-name>"
  4. Add pgvectorscale to your database:

    CREATE EXTENSION IF NOT EXISTS vectorscale CASCADE;