From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add some tests for encoding conversion in COPY TO/FROM
Date: Mon, 16 Dec 2024 02:24:36 +0000
Message-ID: <E1tN0mh-002vj7-FW@gemulon.postgresql.org> (raw)
Add some tests for encoding conversion in COPY TO/FROM
This adds a couple of tests to trigger encoding conversion when input
and server encodings do not match in COPY FROM/TO, or need_transcoding
set to true in the COPY state data. These tests rely on UTF8 <-> LATIN1
for the valid cases as LATIN1 accepts any bytes, and UTF8 <-> EUC_JP for
some of the invalid cases where a character cannot be understood,
causing a conversion failure.
Both ENCODING and client_encoding are covered. Test suggested by Andres
Freund.
Author: Sutou Kouhei
Discussion: https://postgr.es/m/20240206222445.hzq22pb2nye7rm67@awork3.anarazel.de
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/3ad8b840ce8b1d7279f2d0d5fb7d346c0a6a3e8d
Modified Files
--------------
src/test/regress/expected/copyencoding.out | 46 ++++++++++++++++++++++++
src/test/regress/expected/copyencoding_1.out | 8 +++++
src/test/regress/parallel_schedule | 2 +-
src/test/regress/sql/copyencoding.sql | 53 ++++++++++++++++++++++++++++
4 files changed, 108 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add some tests for encoding conversion in COPY TO/FROM
In-Reply-To: <E1tN0mh-002vj7-FW@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox