| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Richard Guo <guofenglinux(at)gmail(dot)com> |
| Subject: | Re: Bug: COPY FORMAT JSON includes generated columns unlike text/CSV |
| Date: | 2026-04-14 14:46:56 |
| Message-ID: | CACJufxEDsyWG0-k_yQszrDw9DpOU0Rvti6EJu5kmQ26HEbHQSw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Apr 13, 2026 at 5:21 PM SATYANARAYANA NARLAPURAM
<satyanarlapuram(at)gmail(dot)com> wrote:
>
> Hi hackers,
>
> COPY TO with FORMAT json includes generated columns in the output,
> while text and CSV formats correctly exclude them. Virtual generated
> columns appear as null (since they aren't materialized), and stored
> generated columns appear with their values Attached a patch to address this.
>
The patch looks good to me.
It seems there's a ``git apply`` issue applying the V1 patch.
The attached v2 is the same as your v1, it should apply without issue
using `git apply` or `git am`.
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-COPY-FORMAT-JSON-with-generated.patch | text/x-patch | 3.5 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2026-04-14 15:16:35 | Re: Support EXCEPT for TABLES IN SCHEMA publications |
| Previous Message | David Geier | 2026-04-14 14:24:10 | Re: Reduce build times of pg_trgm GIN indexes |