You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Export a data dictionary of every table and column #3624
There is no way to hand someone a readable description of a schema. Every export format writes rows or DDL (features/import-export.mdx): CSV, JSON, XLSX, Parquet and Markdown write data, and the Markdown format is "GitHub-flavoured tables" of rows. SQL with Structure writes CREATE statements and COMMENT ON, which a reviewer, an analyst or an auditor cannot read as documentation. The ER diagram exports a PNG only (features/er-diagram.mdx, Export).
Table and column comments can be written in the Structure tab (features/table-structure.mdx, Table comment), but they are read one table at a time.
Proposed solution
File > Export > Export Data Dictionary…, using the same object tree and saved selections as Export, so a schema or a hand-picked set of tables works.
Per table: name, kind, comment, then one row per column with type, nullable, default, primary key, the foreign key it references, and comment; then indexes and foreign keys. Views list their columns too.
Two formats: Markdown with a table of contents and an anchor per table, and one self-contained HTML file with no external assets that prints cleanly.
It reads the catalog only, never a row, so an account with metadata access is enough, and it costs the same on a large table as on an empty one.
Engines without comments or foreign keys leave those columns out rather than printing empty ones.
Done means a 200-table PostgreSQL schema exports to one Markdown file listing every column's type, nullability, default, key and comment.
Alternatives considered
Query information_schema.columns by hand and export the result as Markdown, or SQL export with Structure only.
Activity