| From: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
|---|---|
| To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net> |
| Subject: | Re: [PATCH] Reject ENCODING option for COPY TO FORMAT JSON |
| Date: | 2026-04-20 08:54:47 |
| Message-ID: | CAJTYsWU94ZRstTmJUB_CmempGnWc_Q9P6hV8mpr-Ym6G-Ck_bg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Mon, 20 Apr 2026 at 13:56, Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> > On 20 Apr 2026, at 08:06, Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)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.
>
>
Thanks Daniel. Agreed, v2 attached with an expanded comment
explaining why the option is rejected, I've tried to make it small, because
rest
rejected ones did not have relevant comments.
/*
* Reject ENCODING for JSON format. JSON output is produced as
* a whole by composite_to_json(), so the per-attribute encoding
* conversion done for text and CSV output is not applied.
*/
Regards,
Ayush
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Reject-ENCODING-option-for-COPY-TO-FORMAT-JSON.patch | application/octet-stream | 3.2 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Lakshmi N | 2026-04-20 08:57:43 | Fix pg_upgrade to detect invalid logical replication slots on PG19 |
| Previous Message | Yuchen Li | 2026-04-20 08:49:35 | Re: EXCEPT TABLE - Case inconsistency for describe \d and \dRp+ |