1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +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

@ -2236,6 +2236,10 @@ copy_opt_item:
{
$$ = makeDefElem("force_not_null", (Node *)$4);
}
| ENCODING Sconst
{
$$ = makeDefElem("encoding", (Node *)makeString($2));
}
;
/* The following exist for backward compatibility with very old versions */