Production-ready SQL from your schema — with every dependency resolved in the right order.
With 10 tables it's fine. With 68 tables, 89 foreign keys, and a mix of enums, domains, views, functions, and RLS policies —
the order matters. One misplaced CREATE and your script fails. PgDesigner resolves all of this automatically.
DDL is generated in the correct execution order — not alphabetical, but topological. Each step handles a specific object type, so foreign keys never reference tables that don't exist yet.
Steps 1–6
Steps 7–12
Steps 13–19
Foreign keys are always emitted as ALTER TABLE after all tables are created. Functions come before views, because views may call them; materialized views are sorted by their own inter-dependencies. Identity columns use inline GENERATED … AS IDENTITY — not separate ALTER statements like pg_dump.
We don't just claim accuracy — we test it. The full round-trip cycle:
SQL → PGD → DDL → PostgreSQL → pg_dump → PGD → diff = zero changes tables tested
FK matched exactly
fidelity
Tested on Chinook, Northwind, Pagila, Airlines, AdventureWorks, a synthetic schema with domains, GIN/GiST indexes, triggers and RLS, and private production schemas. The first five ship with the app as sample projects.
pgdesigner generate schema.pgd
pgdesigner generate -o schema.sql schema.pgd
pgdesigner generate schema.pgd | psql "$DATABASE_URL" Pipe it into psql, commit it to git, or use it in your CI pipeline. Zero dependencies — single binary.
Press Ctrl+G to open the Generate DDL dialog. You get a full SQL preview with syntax highlighting, copy to clipboard, and save to file — all before a single statement hits your database.