3 ms·
For CSV export and import from any DB including PostgreSQL, you should look at CSVKit for this purpose. Import with csvsql http://csvkit.readthedocs.org/en/0.3
by ThomasG77 11y ago
For CSV export and import from any DB including PostgreSQL, you should look at CSVKit for this purpose.
Import with csvsql http://csvkit.readthedocs.org/en/0.3.0/scripts/csvsql.html http://csvkit.readthedocs.org/en/0.3.0/scripts/csvsql.html and export with sql2csv http://csvkit.readthedocs.org/en/latest/scripts/sql2csv.html http://csvkit.readthedocs.org/en/latest/scripts/sql2csv.html
- fphilipe 11y agocsvkit is a great tool, use it everyday. Haven't used the sql2csv tool though. For exporting, I'd say that psql2csv [1], which is mentioned in the article, is still easier to use. It has the same interface as psql, except for an additional argument, the query. And, it doesn't depend on python, which might not be available. [1]: https://github.com/fphilipe/psql2csv https://github.com/fphilipe/psql2csv