![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I want to export a CSV file from postgres, but I would like to include the collumn names as the top row of the file to make it easier for folks who ope the file in 'a spreadsheet of their choice' to undersatand the data. The CSV export is pretty simple, if I am willing to add the headers by hand: psql foo -c "begin; create table blah as select * from my_summary order by provider, period_end; copy blah to '/tmp/blah.csv' CSV; rollback " I cannot find a switch or other option that I can switch on to achieve this. Any hints? http://www.postgresql.org/docs/8.2/i.../sql-copy.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |