pgsql-test-seeding
Installation
SKILL.md
Seeding Test Databases with pgsql-test
Load test data efficiently using loadJson, loadSql, and loadCsv methods. Create maintainable, realistic test fixtures.
When to Apply
Use this skill when:
- Setting up test data for database tests
- Loading fixtures from JSON, SQL, or CSV files
- Seeding data that respects or bypasses RLS
- Creating per-test or shared test data
Seeding Methods Overview
| Method | Best For | RLS Behavior |
|---|---|---|
loadJson() |
Inline data, small datasets | Respects RLS (use pg to bypass) |
loadSql() |
Complex data, version-controlled fixtures | Respects RLS (use pg to bypass) |
loadCsv() |
Large datasets, spreadsheet exports | Bypasses RLS (uses COPY) |