psql のクライアントエンコーディンクについて
psqlを使ってpostgresのデータをselectしてcsvに書き出そうとしています。
postgres=# copy (select report_info.* from report_info left join cls_learner on report_info. course_id = cls_learner.course_id where (cls_learner.course_id is null or cls_learner.course_id = '')) TO 'D:\bk\reportinfo.csv';
上記を実行すると下記のエラーが出ます。
ERROR: character with byte sequence 0xe2 0x80 0xa8 in encoding "UTF8" has no equivalent in encoding "SJIS"
\encoding utf8 を前につけるとエラーにならないという記事があったのですが、
これをつけてもデータベース自体の設定に影響は出ないでしょうか?
postgres=# \encoding utf8
postgres=# copy (select report_info.* from report_info left join cls_learner on report_info. course_id = cls_learner.course_id where (cls_learner.course_id is null or cls_learner.course_id = '')) TO 'D:\bk\reportinfo.csv';
データベース自体の設定が変わってしまうなど影響がでないか心配なので、わかる方がいらっしゃいましたら教えていただけないでしょうか。
よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/06/06 09:09