"psql -At -F" export column from table to .csv

From: "Nina" <dingjia(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: "psql -At -F" export column from table to .csv
Date: 2006-02-10 13:35:32
Message-ID: 1139578532.383212.266950@f14g2000cwb.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi ,

I think you maybe familiar with this command:
psql -At -F "," -c "select ..." > query.csv

My question is:
is it possible to export several different columns from different
tables into the same .csv file; something like: psql -At -F "," -c
"select ..." "select ..." "select ..." "select ..." > query.csv

Then, how to write the command in the correct way?

Thanks!

Nina

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-02-10 14:47:42 Re: Database Comparison tool?
Previous Message Doug McNaught 2006-02-10 12:34:35 Re: Sequences/defaults and pg_dump