Skip to content

Quickstart ​

Run PostgreSQL 18 with PiramideDB and query a sample knowledge base in under a minute.

1. Start PostgreSQL with PiramideDB ​

bash
docker build -f quickstart/Dockerfile -t piramidedb-quickstart .
docker run --rm -d --name pdb \
  -p 5433:5432 \
  -e POSTGRES_PASSWORD=piramidedb \
  piramidedb-quickstart

The container starts PostgreSQL 18 with the piramidedb extension enabled and a preloaded multi-tenant knowledge base.

2. Create your first index ​

Connect with psql or any PostgreSQL driver and add a PiramideDB index to a table:

sql
CREATE EXTENSION IF NOT EXISTS piramidedb;

CREATE TABLE documents (
  id     bigserial PRIMARY KEY,
  tenant text NOT NULL,
  body   text NOT NULL
);

CREATE INDEX documents_search_idx ON documents
USING piramidedb (tenant, body)
WITH (
  format = 7,
  analyzer = 'en',
  scoring = 'visible'
);

Query your table using standard SQL:

sql
SELECT id, body
FROM documents
WHERE tenant = 'acme'
  AND body @@@ 'vpn credentials rotated'
ORDER BY body <=> 'vpn credentials rotated'
LIMIT 10;

4. Explore the guided tour ​

Run the bundled SQL tour to see point-in-time filtering, exact phrases, highlighted snippets, permission-safe facets, batched queries, and hybrid vector search in action:

bash
psql "postgresql://postgres:piramidedb@localhost:5433/postgres" -f quickstart/try.sql

Next steps ​

PiramideDB is built by Nomad River.