OSDN Git Service

Add ENCODING option to COPY TO/FROM and file_fdw.
authorItagaki Takahiro <itagaki.takahiro@gmail.com>
Mon, 21 Feb 2011 05:08:04 +0000 (14:08 +0900)
committerItagaki Takahiro <itagaki.takahiro@gmail.com>
Mon, 21 Feb 2011 05:32:40 +0000 (14:32 +0900)
commit3cba8240a195c4f323e3f934bfeab308434a9973
tree39c4641db5d73fb2ecb30a2807845aff53f3714c
parent48d25bac9f024f36b43cbba58778adf9ad0207c6
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.
contrib/file_fdw/file_fdw.c
doc/src/sgml/file-fdw.sgml
doc/src/sgml/ref/copy.sgml
src/backend/commands/copy.c
src/backend/parser/gram.y
src/backend/utils/mb/mbutils.c
src/include/mb/pg_wchar.h
src/test/regress/expected/copy2.out
src/test/regress/sql/copy2.sql