Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wfHHl-005Myj-1E for pgsql-docs@arkaria.postgresql.org; Thu, 02 Jul 2026 13:16:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wfHHj-001isQ-1z for pgsql-docs@arkaria.postgresql.org; Thu, 02 Jul 2026 13:16:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wfHHj-001isH-1F for pgsql-docs@lists.postgresql.org; Thu, 02 Jul 2026 13:16:55 +0000 Received: from mail-yw1-x112e.google.com ([2607:f8b0:4864:20::112e]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wfHHh-00000001ESs-3B3S for pgsql-docs@lists.postgresql.org; Thu, 02 Jul 2026 13:16:54 +0000 Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-8111c0c7561so19707677b3.3 for ; Thu, 02 Jul 2026 06:16:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1782998213; cv=none; d=google.com; s=arc-20260327; b=DvtYnwGbsOkKNylgUbAUYrC+QeY1l4yqpKREUSngLuM7QYpb28uG2gfy4Xz9+3QWig t9EygNfw/g9BCYQ1SVsqx34cTLCGxwo5BH/px1xMJzg4TkG8OlulxJHHOHpH314uw2NB AZFhvxF2i3W+aZNy9kumALJd6D1shVbiWh9MBy0mgWEVycWHigXm7cTOsTEfBkVkbm5n GYNlk0IOzB4mo/8dFQr40qAfCthFIDx4jmONzcLj2bU0/tXspaqQTRyI1MqC5gAw6Ekh CYlp0Fo7JF2RX6fV1e8OvpveI+JvZT65aTQ50etwNKcRRuOGH6Uu/kPzewL0sQvznFsw nVqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=hILp2hBXneGih1fDTfK9IkVmFP0pQUAvx2Cs+jFMgjQ=; fh=9iT4PXhZZQbwsg8r++SnEnoWf6Jw+flE+QGCKOllFZ0=; b=A1pgE6nMmyjhoV6wGXiEet/Lck3S00B3T5wZHQ0FJllHWJ8tfGJW3WUX41h+D338Mw Lcln/ZKbr9Qi2pG3NUJ0B2Do1wmmifPLX3HD47EEc0IM5XF/jy6MFviQS2OF4W+3Cuai x15yLc8IJvquBOdXhDbbSqfE26YvuSS3zyKPckUuoX6Ydm8mZk39h+AjciUKKZlZDQzT zo67Le/laXT1rEelaet2GFd+4WcQXnc/4DY1mnMV8SRXIbXJ5uJdjUlvjYmFoPIJYSE/ N1DSZ1KeysJ6YEOwynucwUXX0EhnL675Am986AHW/TdD3eXUSfNT/JfMHLZ7LursOn+1 QRQA==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782998213; x=1783603013; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hILp2hBXneGih1fDTfK9IkVmFP0pQUAvx2Cs+jFMgjQ=; b=XuHinpYKFFqQvPkxl3Mmljgu2pt13fb+FW6abuEhFb90OmdG7Y39N+w3+CrZ3WkNeN AVbIvR9Ej6CddjJEI9ngCixhsM+nJjChlfIUie7xWPMYE2xxzRqo3X+pxTv+jwwfhH2a m1ei7GSsZ+4Rnbaqran51dWgkJQkb2u9eJdiqoXgxSKnEyr7yxqXOOQQUlC4MRfZVCgz YYaKTCZaeCvOXBPP7kN1R4q3pylhImkiUcxpYqgRVvGGMw1WqC5CxL+uLPw/T/YCaKAM b7qKvw2QbXef8TMoEbj65D5WR9l1C+krLlYfhLXCDCE9lwSG1Gp44+g4SPIV/z0HOsea 2Lsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782998213; x=1783603013; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hILp2hBXneGih1fDTfK9IkVmFP0pQUAvx2Cs+jFMgjQ=; b=OC51l5op7mo1sv9xKWg+juua9IaAUa5hnNw7EPg1F8Q+25fMdZXoMJ0LcMgrJ/tCI1 nrpaltN+dwlej0CG8vk53jtXQVH0zj6FDbV+Vakm7fCbVDQtHbj67CfglacGj6rZuqx3 ikyIBT1Nbe0QpAXjAphJHL2t3rC/KLxFfEH22CsqU49UORMWBVQGTi7FcxZn9s7GUjBr 50zCBnZFQ7e9Nv8BFl2CFxLRbcwXA+Yx1WYaR4vA72yT32gCiyaOy0DkWukf42eRRfcL CBV2rQOS8s5mZz5KdF1UbrF2QtajlitfOMV4P/PEQD8WvAl68wmeIxsFwppGlN0CuzHC KZjA== X-Gm-Message-State: AOJu0YyGk5cshqurxzBtEVufSnanxakiL8Xf6p5LshiSTzGLqqqAzMKO xHmPUYgXGE4SvqhDcjSoDd5tGVB641JD3GVkYr2ZlySAZpIWVzcXmKoBQ258xZT5ZmAwYfu75sr xUQ7Cicwo1W5ldZz2AbXtPbNZZg5UMQQ= X-Gm-Gg: AfdE7cnrPxQbmHjsiZMbe/CfGBe+tEMG++Iax9TIdtwhT/kRJAKr/Q+vPqxy/q1bPOn BhY7+BhBqH9e9JKi3mjJ5vUKBsbdV0y4BrrzRGNban9Tnn51khzJjPgp4aXYoGGfchf6tYgyaF7 BCgfsVx5pSTV77SFpxIqINeMvjpbyuishJMTqEyCigLe04Plqt+BaacmbHxByMj9oVCQRYRNTKc QajbfZCXay38G5WPYi/HcJDjdpwjyC/A9AhsIhYLQrzIh6j0aKpbYxItDXriqx2FA+a2KShEg5m LHAsizh69HRD0AN7kYC705yNALf9KvZCI2ERsUg= X-Received: by 2002:a05:690c:6c03:b0:80c:85b6:765f with SMTP id 00721157ae682-812ec45ff9fmr62922917b3.68.1782998212868; Thu, 02 Jul 2026 06:16:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ayush Tiwari Date: Thu, 2 Jul 2026 18:46:41 +0530 X-Gm-Features: AVVi8CcyZJusRdzvQ5_qE73DIZaCvmXkXf23lgqiQpu4Y7HkDgmEk9LB9vQyGnQ Message-ID: Subject: Re: Document COPY FROM WHERE restrictions on generated and system columns To: Fujii Masao Cc: pgsql-docs@lists.postgresql.org Content-Type: multipart/alternative; boundary="0000000000001cff6c0655a09f43" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --0000000000001cff6c0655a09f43 Content-Type: text/plain; charset="UTF-8" Hi, On Thu, 2 Jul 2026 at 18:41, Fujii Masao 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 --0000000000001cff6c0655a09f43 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

On Thu, 2 Jul 20= 26 at 18:41, Fujii Masao <masao= .fujii@gmail.com> 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<= br> 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 t= o the documentation, patch LGTM.

Regards,
Ayush=C2=A0
=
--0000000000001cff6c0655a09f43--