Populate your dev database in one command — realistic values, correct FK order, reproducible with seed.
Because INSERT INTO users (email) VALUES ('abc123') doesn't look like real data. And if you have 15 tables with foreign keys, you need to insert parents before children, handle circular references, and respect UNIQUE constraints. PgDesigner does all of this automatically.
Kahn's topological sort on the FK graph. Parent tables are always populated first. Deterministic ordering with lexicographic tie-breaking.
Per-column override → name heuristic (30 patterns) → type fallback (35+ types). The first match wins.
Cycles detected in topo sort → broken FK columns get NULL → deferred UPDATE patches them after all INSERTs. Self-references: first 30% get NULL as root nodes.
100-row batches by default. Wrapped in BEGIN/COMMIT transaction. OVERRIDING SYSTEM VALUE for identity columns.
Column named email? You get john.doe@example.com. Column named price? You get 29.99. Timestamps are coherent: updated_at is always after created_at within the same row.
| Pattern | Example value |
|---|---|
email, *_email | alice.smith@example.com |
phone, *_phone | +1-555-0123 |
first_name | Alice |
last_name | Johnson |
username, login | alice_j |
password | aB3$xK9mP2q! |
city, country, address | San Francisco, US, 123 Main St |
price, cost, amount | 29.99 |
url, link, href | https://example.com/path |
created_at | 2024-03-15 14:30:00+00 |
updated_at | created_at + 1–720 hours |
title, subject | Five-word generated sentence |
description, body, content | Paragraph of realistic text |
slug, alias | random-word-pair |
*avatar*, *image*, *photo* | picsum.photos URL |
status_id | 1 (references status tables) |
sort_order, position | Auto-incrementing |
Status tables (statuses, *_status) get well-known values: 1=enabled, 2=disabled, 3=deleted.
Every PostgreSQL type gets a sensible default: uuid → UUID v4, jsonb → '{}', inet → IP address, point → coordinates, int4range → range literal, tsvector → text search vector. Enums pick a random label. Domains resolve to their base type. Arrays generate 1–3 elements.
Partition-aware: for PARTITION BY RANGE and PARTITION BY LIST, generated values fall within valid partition bounds.
pgdesigner testdata schema.pgd
pgdesigner testdata -seed 42 schema.pgd
pgdesigner testdata -rows 100 schema.pgd
pgdesigner testdata -tables users,orders schema.pgd
pgdesigner testdata -o testdata.sql schema.pgd Pipe into psql or save with -o. Seed ensures identical output across runs — useful for test fixtures in CI.