1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add ENCODING option to COPY TO/FROM and file_fdw.

File encodings can be specified separately from client encoding.
If not specified, client encoding is used for backward compatibility.

Cases when the encoding doesn't match client encoding are slower
than matched cases because we don't have conversion procs for other
encodings. Performance improvement would be be a future work.

Original patch by Hitoshi Harada, and modified by me.
This commit is contained in:
Itagaki Takahiro
2011-02-21 14:08:04 +09:00
parent 48d25bac9f
commit 3cba8240a1
9 changed files with 119 additions and 37 deletions

View File

@ -55,6 +55,7 @@ static struct FileFdwOption valid_options[] = {
{ "quote", ForeignTableRelationId },
{ "escape", ForeignTableRelationId },
{ "null", ForeignTableRelationId },
{ "encoding", ForeignTableRelationId },
/*
* force_quote is not supported by file_fdw because it's for COPY TO.