Thread

  1. Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON

    Ayush Tiwari <ayushtiwari.slg01@gmail.com> — 2026-05-04T14:43:41Z

    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.
    
    Regards,
    Ayush