git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: bf9165b) | patch
Add some tests for encoding conversion in COPY TO/FROM
2024年12月16日 02:23:38 +0000 (11:23 +0900)
2024年12月16日 02:23:38 +0000 (11:23 +0900)
commit 3ad8b840ce8b1d7279f2d0d5fb7d346c0a6a3e8d
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
src/test/regress/expected/copyencoding.out [new file with mode: 0644] blob
src/test/regress/expected/copyencoding_1.out [new file with mode: 0644] blob
src/test/regress/parallel_schedule diff | blob | blame | history
src/test/regress/sql/copyencoding.sql [new file with mode: 0644] blob
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /