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

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Andrew Dunstan <andrew@dunslane.net>
Date: 2026-04-20T08:26:22Z
Lists: pgsql-hackers
> On 20 Apr 2026, at 08:06, Ayush Tiwari <ayushtiwari.slg01@gmail.com> wrote:

> The attached patch rejects the explicit ENCODING option for JSON
> mode, consistent with how DELIMITER, NULL, DEFAULT, and HEADER are
> already rejected.

Given that we reject other incompatible parameters it makes sense to reject
this one as well, however I think we can expand the comment a little and
explain why.

--
Daniel Gustafsson




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Apply encoding conversion in COPY TO FORMAT JSON