PgDesigner

Import & Reverse Engineer PostgreSQL Schemas

Coming from another tool? Connect to a live database? One command converts any source into a PgDesigner project.

Five sources, one output

PgDesigner reads schemas from five different sources and converts them into its native .pgd format — tables, columns, indexes, foreign keys, constraints, enums, domains, sequences, views, functions, triggers, and comments. The SQL path is round-trip tested on real databases: SQL → .pgd → DDL → PostgreSQL → pg_dump → .pgd with zero diff.

MicroOLAP Database Designer

.pdd — native XML format. MicroOLAP hasn't been updated since 2021, but your projects aren't lost.

DbSchema

.dbs — XML-based schema files from DbSchema.

Toad Data Modeler

.dm2 — XML format from Quest Toad Data Modeler.

Plain SQL / pg_dump

.sql — any PostgreSQL DDL file, including pg_dump output. Parsed with the real PG17 parser (via WebAssembly).

Reverse engineering from a live database

PgDesigner DSN Introspection dialog connecting to PostgreSQL and showing schemas in light theme

Pass a PostgreSQL connection string instead of a file path. PgDesigner connects to your database and introspects the schema via pg_catalog queries:

pgdesigner convert -o project.pgd "postgres://user:pass@localhost:5432/mydb"
pgdesigner convert -full -schema public,billing -o project.pgd "postgres://localhost/mydb"

Always extracted:

  • Tables and columns (types, defaults, identity, nullable, storage, compression, comments)
  • Indexes (btree, hash, gin, gist, brin — with INCLUDE columns)
  • Primary keys, foreign keys, UNIQUE, CHECK, EXCLUDE constraints
  • Sequences
  • Partitions (RANGE, LIST, HASH — with bounds)

Add -full for extensions, enums, domains, views, materialized views (with their indexes), functions, and triggers. -schema limits introspection to the listed schemas.

In the visual editor, File → Open… → PostgreSQL connects first and shows a preview of what's there — then you pick the schemas, individual tables, and object categories (views, functions, triggers, enums, domains, sequences, extensions) to import.

CLI

pgdesigner convert -o project.pgd schema.pdd
pgdesigner convert -o project.pgd schema.dbs
pgdesigner convert -o project.pgd schema.dm2
pgdesigner convert -o project.pgd schema.sql
pgdesigner convert -o project.pgd "postgres://localhost:5432/mydb"

The -o flag sets the output file. Without it, PgDesigner uses the input filename with a .pgd extension.

Migrating from MicroOLAP?

MicroOLAP Database Designer for PostgreSQL hasn't been updated since July 2021. If you have .pdd project files, PgDesigner reads them natively — no intermediate steps. Convert and open in the visual editor in seconds:

pgdesigner convert -o myproject.pgd myproject.pdd
pgdesigner myproject.pgd