Re: Bug: COPY FORMAT JSON includes generated columns unlike text/CSV
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Richard Guo <guofenglinux@gmail.com>
Date: 2026-04-14T14:46:56Z
Lists: pgsql-hackers
Attachments
- v2-0001-COPY-FORMAT-JSON-with-generated.patch (text/x-patch) patch v2-0001
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/
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix COPY TO FORMAT JSON to exclude generated columns.
- f30d0c720f2e 19 (unreleased) landed