Document COPY FROM WHERE restrictions on generated and system columns
Fujii Masao <masao.fujii@gmail.com>
From: Fujii Masao <masao.fujii@gmail.com>
To: pgsql-docs@lists.postgresql.org
Date: 2026-06-25T16:46:41Z
Lists: pgsql-docs
Attachments
- v1-v14-18-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.txt (text/plain)
- v1-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.patch (application/octet-stream) patch v1-0001
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