public inbox for [email protected]help / color / mirror / Atom feed
Document COPY FROM WHERE restrictions on generated and system columns 3+ messages / 2 participants [nested] [flat]
* Document COPY FROM WHERE restrictions on generated and system columns @ 2026-06-25 16:46 Fujii Masao <[email protected]> 2026-07-02 13:16 ` Re: Document COPY FROM WHERE restrictions on generated and system columns Ayush Tiwari <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Fujii Masao @ 2026-06-25 16:46 UTC (permalink / raw) To: [email protected] 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 From 168af14a081eec04c03e509df21715cafa81582d Mon Sep 17 00:00:00 2001 From: Fujii Masao <[email protected]> Date: Fri, 26 Jun 2026 00:56:51 +0900 Subject: [PATCH v1] 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 branches. The system-column restriction was introduced in v19, so that part does not need to be backpatched. --- 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 8433344e5b6..5413bb0e12d 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -480,10 +480,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> -- 2.53.0 Attachments: [text/plain] v1-v14-18-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.txt (1.7K, ../../CAHGQGwEgxErc54yVOAVWCsr1O=8pgw4oKRPuEQ9mfhkoYGR_XA@mail.gmail.com/2-v1-v14-18-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.txt) download | inline diff: From 168af14a081eec04c03e509df21715cafa81582d Mon Sep 17 00:00:00 2001 From: Fujii Masao <[email protected]> Date: Fri, 26 Jun 2026 00:56:51 +0900 Subject: [PATCH v1] 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 branches. The system-column restriction was introduced in v19, so that part does not need to be backpatched. --- 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 8433344e5b6..5413bb0e12d 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -480,10 +480,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> -- 2.53.0 [application/octet-stream] v1-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.patch (1.7K, ../../CAHGQGwEgxErc54yVOAVWCsr1O=8pgw4oKRPuEQ9mfhkoYGR_XA@mail.gmail.com/3-v1-0001-doc-Clarify-COPY-FROM-WHERE-expression-restrictio.patch) download | inline diff: From b8638cf68a4ee4309dd832404e9845daa02f8b8a Mon Sep 17 00:00:00 2001 From: Fujii Masao <[email protected]> Date: Fri, 26 Jun 2026 00:42:23 +0900 Subject: [PATCH v1] 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 branches. The system-column restriction was introduced in v19, so that part does not need to be backpatched. --- 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 4706c9a4410..b23433b2c41 100644 --- a/doc/src/sgml/ref/copy.sgml +++ b/doc/src/sgml/ref/copy.sgml @@ -545,10 +545,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, system columns, 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> -- 2.53.0 ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Document COPY FROM WHERE restrictions on generated and system columns 2026-06-25 16:46 Document COPY FROM WHERE restrictions on generated and system columns Fujii Masao <[email protected]> @ 2026-07-02 13:16 ` Ayush Tiwari <[email protected]> 2026-07-08 03:48 ` Re: Document COPY FROM WHERE restrictions on generated and system columns Fujii Masao <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: Ayush Tiwari @ 2026-07-02 13:16 UTC (permalink / raw) To: Fujii Masao <[email protected]>; +Cc: [email protected] Hi, On Thu, 2 Jul 2026 at 18:41, Fujii Masao <[email protected]> wrote: > 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? > Thanks for the patch! I think it makes sense to add the system columns and generated columns limitation to the documentation, patch LGTM. Regards, Ayush ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Document COPY FROM WHERE restrictions on generated and system columns 2026-06-25 16:46 Document COPY FROM WHERE restrictions on generated and system columns Fujii Masao <[email protected]> 2026-07-02 13:16 ` Re: Document COPY FROM WHERE restrictions on generated and system columns Ayush Tiwari <[email protected]> @ 2026-07-08 03:48 ` Fujii Masao <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Fujii Masao @ 2026-07-08 03:48 UTC (permalink / raw) To: Ayush Tiwari <[email protected]>; +Cc: [email protected] On Thu, Jul 2, 2026 at 10:16 PM Ayush Tiwari <[email protected]> wrote: > Thanks for the patch! > > I think it makes sense to add the system columns and generated > columns limitation to the documentation, patch LGTM. Thanks for the review! I've pushed the patch. Regards, -- Fujii Masao ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2026-07-08 03:48 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-25 16:46 Document COPY FROM WHERE restrictions on generated and system columns Fujii Masao <[email protected]> 2026-07-02 13:16 ` Ayush Tiwari <[email protected]> 2026-07-08 03:48 ` Fujii Masao <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox