question about \encoding option of psql

From: Xiaobo Gu <guxiaobo1982(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: question about \encoding option of psql
Date: 2011-12-15 06:12:40
Message-ID: CACOCgcmf2=3H-Uf37KVM1KVBpx1sY8SaXhu8j+GSO4=c+Vcp0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I know \encoding is a meta command to set client encoding on psql
prompt, but how can I set it inside the psql command line which will
be called inside shell scripts,

psql -h 192.168.72.7 -U gpadmin -w -d miner_demo -c"\copy demo.store
to 'd:\store.csv' with csv header"

How can I set the encoding for the export csv file?

Regards,

Xiaobo Gu

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2011-12-15 06:26:12 Re: question about \encoding option of psql
Previous Message Mike Christensen 2011-12-15 05:54:02 Re: Correct syntax to create partial index on a boolean column