question about \encoding option of psql - Mailing list pgsql-general

From Xiaobo Gu
Subject question about \encoding option of psql
Date
Msg-id CACOCgcmf2=3H-Uf37KVM1KVBpx1sY8SaXhu8j+GSO4=c+Vcp0g@mail.gmail.com
Whole thread Raw
Responses Re: question about \encoding option of psql
Re: question about \encoding option of psql
List 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

pgsql-general by date:

Previous
From: Mike Christensen
Date:
Subject: Re: Correct syntax to create partial index on a boolean column
Next
From: John R Pierce
Date:
Subject: Re: question about \encoding option of psql