All Templates / Storage

pgvector

pgvector

Open-source vector similarity search for Postgres

Deploy pgvector

pgvector

pgvector/pgvector:pg16

Just deployed

/var/lib/postgresql/data

Postgres with the pgvector extension installed. TCP proxying is configured to allow accessing the database from anywhere.

How to use

Reference the DATABASE_URL variable from your service to connect to the database in your tool of choice (e.g. ${{pgvector.DATABASE_URL}}

Connecting

You can connect to your database using the proxied domain and port found on the service settings page. The password can be found on the Variables page.

Testing

Once connected, test that pgvector is setup with the following SQL.

CREATE EXTENSION vector;
CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
INSERT INTO items (embedding) VALUES ('[1,2,3]'), ('[4,5,6]');
SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 5;

Template Content

Deploy Now

Details

Created on Sep 8, 2023

158 total projects

56 active projects

100% success on recent deploys

Storage



More templates in this category

View Template
ReadySet

ReadySet

A lightweight caching engine for Postgres


Milo

View Template
EdgeDB

EdgeDB

EdgeDB template based on their Docker deployment guide


Ajit Krishna

View Template
Apache Kvrocks

Apache Kvrocks

A drop-in replacement for Redis to store data on a volume.


Bram