PostgreSQL data dictionary generator
ErdDocs generates a PostgreSQL data dictionary from pg_dump --schema-only output: every table, column, type, default, index and relationship in one document, with COMMENT ON texts as descriptions, saved as a PDF from the browser’s print dialog. The dump is parsed in your browser and never uploaded — no signup, nothing to install.
The example is a SaaS billing schema: COMMENT ON fills the Description column, one key arrives via ALTER TABLE ONLY, and usage_events keeps its two partitions folded into one entry.
From a Postgres server to a document
- 01
pg_dump --schema-only mydb > schema.sql— add--schema=publicto narrow it, or run against a hosted connection string (RDS, Supabase, Neon). - 02Paste the file above or drop it onto the panel.
- 03Read the dictionary, then Save as PDF — printed by your browser, no server render.
pg_dump idioms the parser knows
- Keys declared after the fact. pg_dump emits tables first and constraints later as
ALTER TABLE ONLY … ADD CONSTRAINT; the dictionary resolves them all, composite keys included. - Partitions fold into their parent. Each partition arrives as its own
CREATE TABLE … PARTITION OF— described once, listed by name under the logical table. - The dialect’s own types.
bigserial,timestamptz,jsonb, arrays, enums viaCREATE TYPE … AS ENUM, generated columns up to PostgreSQL 18'sVIRTUALspelling. - Namespaces. Multi-schema dumps keep their qualifiers; a single-schema dump reads without the
public.noise.
FAQ
Is this the same as PostgreSQL text search dictionaries?
No. ErdDocs generates the other kind of dictionary: a human-readable reference of your schema — every table, column, type, default, index and relation — for teammates, auditors and clients. PostgreSQL happens to use the same word for a full-text search object that normalizes words into lexemes, which is why the Postgres manual turns up in this search; that object has nothing to do with documenting your tables.
Is this different from querying the system catalogs?
ErdDocs produces the finished document straight from a pg_dump file: same source of truth, print-ready form, and the dump never leaves your browser. pg_catalog and information_schema hold the same facts, but as queryable tables for tools — assembling a readable document out of them is a day of SQL and formatting.
How do I export a PostgreSQL schema?
pg_dump --schema-only mydb > schema.sql. For one schema out of many: add --schema=public. From a hosted database (RDS, Supabase, Neon) the same command works against the connection string. Paste the file above — parsing runs locally.
Where do descriptions come from in PostgreSQL?
COMMENT ON TABLE orders IS 'text' and COMMENT ON COLUMN orders.status IS 'text' — separate statements, exported by pg_dump automatically. They become the Description column of the dictionary. Comments on extensions, functions and other non-table objects are skipped without being reported as errors.
What happens to partitioned tables?
They stay one table. A pg_dump of a partitioned schema arrives as the parent plus every partition as its own CREATE TABLE — pagila ships 55 monthly partitions of payment. The dictionary describes the logical table once and lists its partitions by name underneath; the diagram draws a single card.
Does it handle ALTER TABLE ONLY ... ADD CONSTRAINT?
Yes. pg_dump declares keys after the tables, as ALTER TABLE ONLY statements — every foreign key in the dictionary is resolved through that pass, including composite keys.
What does it cost?
Diagrams up to 25 tables and the dictionary preview are free, no account. One $9 payment unlocks the full document and diagram for any schema size — once, not per seat.
Related
- Data dictionary generator — the dialect-neutral page.
- MySQL data dictionary generator — the same document from mysqldump.
- SQL to ER diagram — the diagram side of the tool.