database.pizza
database.pizza is a managed database service. You create an organization, create a database, and then talk to it two ways: over a PostgreSQL-compatible wire protocol using the client you already know, or over a simple HTTP JSON API from any language.
Under the hood every database runs on PizzaSQL, a SQL engine built from scratch in Go. PizzaSQL speaks SQLite-compatible SQL through a PostgreSQL wire interface, so it looks like Postgres to your tools while using SQLite’s forgiving type system. It is not PostgreSQL itself.
Three ways in
Section titled “Three ways in”- New here? Follow the Quickstart — five minutes from empty account to your first query.
- Writing SQL? Start with SQL at a glance and keep the compatibility notes close before generating production queries.
- Curious how it works? The Engine Internals section walks through the PizzaSQL architecture, query lifecycle, and storage model.
What you get
Section titled “What you get”Every database gives you three access surfaces plus a dashboard:
| Surface | Where | Best for |
|---|---|---|
| PostgreSQL wire protocol | db.database.pizza:5432 |
Existing psql, pg, psycopg, ORM, and BI tools |
| HTTP query API | https://db.database.pizza/<org>/<db>/query |
Any language, serverless, and edge workloads |
| Auto-generated REST API (preview) | https://db.database.pizza/<org>/<db>/api/<table> |
Single-table CRUD without writing SQL |
| Dashboard | app.database.pizza |
Schema browsing, query editor, API keys, metrics |
All programmatic access is authenticated with API keys. Keys carry granular scopes — read, write, alter_table, drop_table — so you can issue a read-only key to a reporting job and a write key to an ingestion service. See API keys & permissions.
A taste
Section titled “A taste”Create a key in the dashboard, then query over HTTP:
curl -s https://db.database.pizza/acme/production/query \ -H "Authorization: Bearer pz_live_REPLACE_ME" \ -H "Content-Type: application/json" \ -d '{"sql": "SELECT 1 + 1 AS answer"}'Or with psql, using the key as the password:
PGPASSWORD='pz_live_REPLACE_ME' psql \ "postgresql://u@db.database.pizza:5432/acme%2Fproduction?sslmode=disable"Throughout these docs we use a fictional organization acme and database production, and the placeholder key pz_live_REPLACE_ME. Substitute your own values — and never paste a real key into anything you share.
Getting started
Section titled “Getting started”- Quickstart — create an org, database, and key; run your first query.
- Connect — connection strings and parameters for every client.
- Your first schema — tables, inserts, indexes, and queries.
Use your database
Section titled “Use your database”- PostgreSQL clients —
psql, GUIs, and driver configuration. - HTTP query API — the managed JSON endpoint.
- JavaScript and Python — idiomatic examples.
- REST API — auto-generated CRUD endpoints.
- API keys & permissions — scopes, lifecycle, and security.
Reference and guides
Section titled “Reference and guides”- SQL reference — types, statements, expressions, functions, and constraints.
- Import & export — move data in and out.
- Errors & troubleshooting — understand failure responses.
- Limits & quotas — what counts against your plan.
The managed API vs. the engine
Section titled “The managed API vs. the engine”It’s worth drawing one distinction early. PizzaSQL, the engine, exposes its own raw HTTP API (POST /query, GET /schema/tables, and so on) and its own PostgreSQL listener. Those are internal to the platform. As a customer you never touch them directly.
Instead, you talk to the managed proxy at db.database.pizza, which sits in front of your engine instance and adds authentication, per-organization routing (<org>/<db>), scope enforcement, quotas, and metrics. The endpoints look similar to the engine’s, but they require a Bearer API key and a <org>/<db> path. The pages under Use your database document the managed surface.
Status
Section titled “Status”database.pizza is under active development. Features, quotas, and exact response shapes may change; anything unstable is flagged inline. If something here disagrees with what you observe, trust the observed behavior and open an issue.