pgsql: Add ENCODING option to COPY TO/FROM and file_fdw.

From: Itagaki Takahiro <itagaki(dot)takahiro(at)gmail(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add ENCODING option to COPY TO/FROM and file_fdw.
Date: 2011-02-21 05:33:02
Message-ID: E1PrOOM-0007eW-Di@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3cba8240a195c4f323e3f934bfeab308434a9973

Modified Files
--------------
contrib/file_fdw/file_fdw.c | 1 +
doc/src/sgml/file-fdw.sgml | 11 ++++++
doc/src/sgml/ref/copy.sgml | 20 ++++++++++--
src/backend/commands/copy.c | 60 +++++++++++++++++++++++-----------
src/backend/parser/gram.y | 4 ++
src/backend/utils/mb/mbutils.c | 46 ++++++++++++++++++++++-----
src/include/mb/pg_wchar.h | 2 +
src/test/regress/expected/copy2.out | 6 ++--
src/test/regress/sql/copy2.sql | 6 ++--
9 files changed, 119 insertions(+), 37 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-02-21 06:12:57 Re: pgsql: Add ENCODING option to COPY TO/FROM and file_fdw.
Previous Message Bruce Momjian 2011-02-21 03:21:34 pgsql: Merge two documentation permission chapters into a single chapte