Document COPY FROM WHERE restrictions on generated and system columns

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Document COPY FROM WHERE restrictions on generated and system columns
Date: 2026-06-25 16:46:41
Message-ID: CAHGQGwEgxErc54yVOAVWCsr1O=8pgw4oKRPuEQ9mfhkoYGR_XA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi,

I found that generated columns and system columns cannot be used in
COPY FROM WHERE expressions, but the COPY docs still mentions
only the restriction on subqueries.

So I've created the attached patch which updates the docs to also list
generated columns and system columns as unsupported in COPY FROM WHERE
expressions.

Since generated columns have been rejected in COPY FROM WHERE since
v13, that docs change should be backpatched to all supported branches.
But the system-column restriction was introduced in v19, so that part
does not need to be backpatched.

Thoughts?

Regards,

--
Fujii Masao

Attachment Content-Type Size
v1-v14-18-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.txt text/plain 1.7 KB
v1-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.patch application/octet-stream 1.7 KB

Browse pgsql-docs by date

  From Date Subject
Previous Message Pete O'Such 2026-06-18 04:45:46 Re: Doc error re: "not null" "not valid"