Re: Bug: COPY FORMAT JSON includes generated columns unlike text/CSV - Mailing list pgsql-hackers

From jian he
Subject Re: Bug: COPY FORMAT JSON includes generated columns unlike text/CSV
Date
Msg-id CACJufxEDsyWG0-k_yQszrDw9DpOU0Rvti6EJu5kmQ26HEbHQSw@mail.gmail.com
Whole thread
In response to Bug: COPY FORMAT JSON includes generated columns unlike text/CSV  (SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>)
Responses Re: Bug: COPY FORMAT JSON includes generated columns unlike text/CSV
List pgsql-hackers
On Mon, Apr 13, 2026 at 5:21 PM SATYANARAYANA NARLAPURAM
<satyanarlapuram@gmail.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`.



--
jian
https://www.enterprisedb.com/

Attachment

pgsql-hackers by date:

Previous
From: David Geier
Date:
Subject: Re: Reduce build times of pg_trgm GIN indexes
Next
From: vignesh C
Date:
Subject: Re: Support EXCEPT for TABLES IN SCHEMA publications