如何使用带有ANSI编码的postgresql copy命令?

如何使用带有ANSI编码的postgresql copy命令?,postgresql,csv,ansi,Postgresql,Csv,Ansi,我使用PostgreSQL copy命令生成csv文件 COPY (select * from table) from '/tmp/123456.csv' with csv header encoding 'UTF8'; 此命令正常 但我想用ANSI编码制作文件,因为我想在MicrosoftExcel中打开它 COPY (select * from table) from '/tmp/123456.csv' with csv header encoding 'ANSI'; 此命令无法生成cs

我使用PostgreSQL copy命令生成csv文件

COPY (select * from table) from '/tmp/123456.csv' with csv header encoding 'UTF8';
此命令正常

但我想用ANSI编码制作文件,因为我想在MicrosoftExcel中打开它

COPY (select * from table) from '/tmp/123456.csv' with csv header encoding 'ANSI';

此命令无法生成csv文件

,因为您似乎在Windows上,可能您想使用其中一种,例如西欧语言的
WIN1252

没有编码“ANSI”。如果您指的是单字节编码,那么您可能需要
ISO-8859-1
您指的是
copy to