postgres.git / summary / log / commit / refs

commit    497d2ebbfb9a79f493ed43b1fe98853b05b45d63
Author:   Fujii Masao <fujii@postgresql.org>
Date:     Wed Jul 08 03:45:20 2026 +0000
First released in: 14.24, 15.19, 16.15, 17.11, 18.6

    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 <masao.fujii@gmail.com>
    Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
    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 99a6dff77b9..f6db8857a42 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -399,10 +399,11 @@ WHERE <replaceable class="parameter">condition</replaceable> </para> <para> - Currently, subqueries are not allowed in <literal>WHERE</literal> - expressions, and the evaluation does not see any changes made by the - <command>COPY</command> itself (this matters when the expression - contains calls to <literal>VOLATILE</literal> functions). + Currently, subqueries and generated columns are not allowed in + <literal>WHERE</literal> expressions, and the evaluation does not see + any changes made by the <command>COPY</command> itself (this matters + when the expression contains calls to <literal>VOLATILE</literal> + functions). </para> </listitem> [parent: 4eccaa8d23a2]