Re: confusing / inefficient "need_transcoding" handling in copy

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Sutou Kouhei <kou@clear-code.com>
Cc: andres@anarazel.de, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org, ishii@sraoss.co.jp
Date: 2024-12-16T02:25:16Z
Lists: pgsql-hackers
On Sat, Dec 14, 2024 at 04:46:57PM +0900, Michael Paquier wrote:
> Note that using "test" as table name for the tests is not a good idea,
> as this could very likely conflict with some concurrent activity.  I
> would also add two RESET queries to remove the dependency to
> client_encoding once the test has no need to rely on it.  No need to
> send a new patch for all that, just noticing in passing.

I got some time to look again at this one.  Applied with the tweaks 
for the table name and the two RESET queries.
--
Michael

Commits

  1. Add some tests for encoding conversion in COPY TO/FROM

  2. Improve COPY TO performance when server and client encodings match