Skip to content
DocumentationTry Hanzo
Relational Database

Hanzo SQL

Hanzo SQL 18, run for you

This is the engine itself, not a reimplementation of it, so your driver, your ORM and psql connect the way they always have. Five extensions are enabled before you get the connection string — pgvector for embeddings, pg_trgm for fuzzy text, btree_gin for mixed indexes, uuid-ossp for keys, and pg_stat_statements so the slow query is already recorded when you go looking for it.

PG 18
Version
ACID
Transactions
pgvector
Already on
WAL
Restore to a second

Hanzo SQL, without the pager duty

You write the queries. We take the upgrades, the archiving and the replicas.

pgvector

An embedding is a column beside the row it describes, so nearest-neighbour search and a WHERE clause are one query against one store. HNSW and IVFFlat indexes, cosine, L2 or inner product.

Connection Pooling

Built-in PgBouncer. Handle thousands of connections without overloading the database.

Branching

Create database branches for development and testing. Instant copy-on-write clones.

Backups you don’t schedule

The write-ahead log is archived as it is written, so recovery targets a second rather than the last nightly dump. Name a timestamp and the database comes back as it stood.

Query Insights

pg_stat_statements is on from first boot, so the query that got slow last Tuesday was already being counted. Calls, total and mean time, rows and buffer hits, per normalised statement.

Read replicas

Streaming replication keeps a second copy in step with the primary, byte for byte. Send reports and dashboards there and leave the primary to the writes.

Your driver already speaks it. That is the feature.

schema.sql
-- Enable vector extension
CREATE EXTENSION IF NOT EXISTS vector;

-- Store embeddings alongside your data
CREATE TABLE documents (
  id         BIGSERIAL PRIMARY KEY,
  content    TEXT NOT NULL,
  embedding  vector(1536),
  metadata   JSONB DEFAULT '{}',
  created_at TIMESTAMPTZ DEFAULT NOW()
);

-- HNSW index for fast similarity search
CREATE INDEX ON documents
  USING hnsw (embedding vector_cosine_ops);

-- Query with standard SQL
SELECT content, 1 - (embedding <=> $1) AS similarity
FROM documents
ORDER BY embedding <=> $1
LIMIT 10;
Open Source Revenue Sharing

Up to 5% of compute goes back to open source

Every deployment is SBOM-verified. Contributors to PostgreSQL earn a share of compute revenue — transparent, on-chain, and customizable by the community.

Point a connection string at it

Free tier includes 1 GB storage and 1M row reads/month.

Open source

License: PostgreSQLhanzoai/sql

Get SQL

Managed relational database