Every developer eventually needs to email a CSV: reproduce a bug, share samples with analytics, or import into a spreadsheet for a one-off fix. Command-line tools work, but a GUI export button saves time when you already have the perfect SELECT open.
When CSV is the right format
- Humans need to sort and filter in Excel or Google Sheets
- Importing into another system with a CSV upload wizard
- Attaching anonymized samples to support tickets
- Quick diff between query runs (export, git diff)
For large machine pipelines prefer Parquet or direct database links. CSV is for human-scale slices, usually thousands to low millions of rows depending on RAM.
Getting the query right first
Export what you mean, not SELECT * on a fact table. Name columns explicitly, filter to the date range, and add LIMIT while exploring. PgNative adds a default row cap on run for safety; Pro removes limits for large exports when you truly need them.
SELECT id, email, status, created_at
FROM subscriptions
WHERE created_at >= '2026-01-01'
AND status = 'past_due'
ORDER BY created_at DESC
LIMIT 50000;Encoding and Excel gotchas
- UTF-8 with BOM helps Excel open accents correctly on Windows
- Quote fields that contain commas or newlines
- Format timestamps in ISO 8601 to avoid locale ambiguity
- Watch for leading zeros stripped when Excel treats phone numbers as numbers
Exporting from PgNative Pro
Run your query in the editor, verify rows in the grid, then export to CSV from the results panel. The free tier focuses on querying and inspection; Pro unlocks export for production workflows. Saved connections work across Postgres, MySQL, and SQLite, so the export path is identical regardless of engine.
Security reminder
CSV files are not access controlled once saved to Downloads. Scrub PII before sharing. Use read-only database roles for export connections. Delete files after the ticket closes.
Alternatives for huge datasets
For tables larger than comfortable RAM, use COPY TO on Postgres, mysqldump with WHERE, or ETL tools. The GUI export shines on targeted queries, not full database clones. See pricing for Pro export features.