Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON
Date
Msg-id c347fbce-ff41-40af-bcd5-47fbd6cfd04f@dunslane.net
Whole thread
In response to Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON  (Ayush Tiwari <ayushtiwari.slg01@gmail.com>)
List pgsql-hackers


On 2026-05-04 Mo 10:43 AM, Ayush Tiwari wrote:
Hi,

On Mon, 4 May 2026 at 19:49, Andrew Dunstan <andrew@dunslane.net> wrote:

Basically good, I think. I have modified your test a bit, testing more directly for the presence of the LATIN-1 encoded character and the absence of the UTF-8 encoded character, by reading in the file with pg_read_binary_file, and adding a test for implicit encoding by setting client_encoding.


The revised tests look better to me.  Checking the raw bytes with
pg_read_binary_file() directly verifies that LATIN1 output does not contain 
the UTF-8 sequence, and the added implicit client_encoding case too 
looks good.

Thanks for improving the test coverage.



pushed.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Proposal: Conflict log history table for Logical Replication
Next
From: Andrew Dunstan
Date:
Subject: Re: Avoid leaking system path from pg_available_extensions