Skip to content

Latest commit

 

History

History
4 lines (3 loc) · 183 Bytes

heroku-postgres-query-results-csv-dump.md

File metadata and controls

4 lines (3 loc) · 183 Bytes

Get query results as a CSV from Heroku postgres:

Bash: heroku pg:psql --app <your-app> DATABASE_URL SQL: \copy (SELECT * from users WHERE role = 'admin') TO dump.csv CSV HEADER;