CSVデータのデータ入出力 † これが一番ラクかも $ psql -U USER DATABASE -c "\COPY (SELECT * FROM table) TO '/table.csv' WITH CSV HEADER" 入力 psql# \copy table from ./data.csv 出力 psql# \copy table to ./data.csv SQLを実行してファイルに出力 c コマンド実行 A 位置揃えをしない F 区切り文字 $ psql -U USER DATABASE -c "SELECT * FROM table" -A -F, > /table.csv 文字コードの変換は以下でできます。 UTF-8からShift_JISに変換する場合。 $ iconv -f UTF8 -t cp932 table.csv > table_sjis.csv 変換できな