generate_seed_data
Generate fake seed data for any PostgreSQL table, respecting schema constraints like NOT NULL, UNIQUE, enums, and defaults. Supports numeric, text, boolean, UUID, date/time, bytea, JSON, and network types with per-column overrides.
Instructions
Generate schema-aware fake seed data for a table. Respects NOT NULL, UNIQUE/PK (with retry-with-collision-suffix), enum types (cycles through labels), defaults (uses DEFAULT for unknown types), text length limits, and FK columns (skipped or filled — caller's choice). Generates type-appropriate values for numeric, text, boolean, uuid, date/timestamp, bytea, JSON, inet, cidr, macaddr. Per-column overrides via column_values. Apply directly (default) or return SQL only via apply: false.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | ||
| schema | No | public | |
| count | Yes | ||
| column_values | No | Per-column SQL value override (e.g. { country: "'US'", priority: '1' }). Quoted as PG literals. | |
| skip_fks | No | ||
| apply | No | Apply to DB (default true) or return SQL only (false). | |
| server | No | ||
| database | No | ||
| override_schema | No |