pgdesigner [command] [flags] <file> Input files: .pgd, .pdd, .dbs, .dm2, .sql, or a PostgreSQL connection string.
Opens the visual editor in your default browser.
pgdesigner schema.pgd Generate production-ready DDL from a schema file.
pgdesigner generate schema.pgd
pgdesigner generate -o schema.sql schema.pgd | Flag | Default | Description |
|---|---|---|
-o | stdout | Output .sql file |
Compare two schemas and generate ALTER SQL.
pgdesigner diff old.pgd new.pgd
pgdesigner diff -f json old.pgd new.pgd | Flag | Default | Description |
|---|---|---|
-f | sql | Output format: sql or json |
Validate schema against 75 rules.
pgdesigner lint schema.pgd
pgdesigner lint -f json schema.pgd
pgdesigner lint -s error schema.pgd
pgdesigner lint -fix schema.pgd | Flag | Default | Description |
|---|---|---|
-f | text | Output format: text or json |
-s | info | Minimum severity: error, warning, info |
-fix | false | Auto-fix fixable issues and save |
Generate realistic INSERT statements.
pgdesigner testdata schema.pgd
pgdesigner testdata -seed 42 -rows 100 schema.pgd
pgdesigner testdata -tables users,orders -o seed.sql schema.pgd | Flag | Default | Description |
|---|---|---|
-o | stdout | Output .sql file |
-seed | 0 (random) | Random seed for reproducibility |
-rows | 50 | Rows per table |
-tables | all | Comma-separated table names |
Import from other formats or live database.
pgdesigner convert schema.pdd -o project.pgd
pgdesigner convert schema.sql -o project.pgd
pgdesigner convert "postgres://localhost/mydb" -o project.pgd | Flag | Default | Description |
|---|---|---|
-o | input name + .pgd | Output .pgd file |
Supported inputs: .pdd (MicroOLAP), .dbs (DbSchema), .dm2 (Toad), .sql (pg_dump), PostgreSQL connection string.
| Code | Meaning |
|---|---|
0 | Success (no lint errors, no diff changes) |
1 | Lint errors found or diff has changes |
2 | File not found or parse error |
Single statically-linked binary. No runtime dependencies.