From fd224fe90823de3df4f209c09a5794606ff70dc7 Mon Sep 17 00:00:00 2001 From: Fujii Masao Date: Wed, 8 Jul 2026 12:45:20 +0900 Subject: [PATCH] doc: Clarify COPY FROM WHERE expression restrictions Commit aa606b9316a disallowed generated columns in COPY FROM WHERE expressions, and commit 21c69dc73f9 disallowed system columns. However, the COPY reference page still mentions only the restriction on subqueries. Update the documentation to also list generated columns and system columns as unsupported in COPY FROM WHERE expressions. Backpatch the generated-column documentation change to all supported versions. Backpatch the system-column documentation change to v19, where that restriction was introduced. Author: Fujii Masao Reviewed-by: Ayush Tiwari Discussion: https://postgr.es/m/CAHGQGwEgxErc54yVOAVWCsr1O=8pgw4oKRPuEQ9mfhkoYGR_XA@mail.gmail.com Backpatch-through: 14 --- doc/src/sgml/ref/copy.sgml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml index 9055d4e6756..47e50afd223 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -379,10 +379,11 @@ WHERE condition - Currently, subqueries are not allowed in WHERE - expressions, and the evaluation does not see any changes made by the - COPY itself (this matters when the expression - contains calls to VOLATILE functions). + Currently, subqueries and generated columns are not allowed in + WHERE expressions, and the evaluation does not see + any changes made by the COPY itself (this matters + when the expression contains calls to VOLATILE + functions).