pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Disallow generated columns in COPY WHERE clause
Date: Thu, 06 Nov 2025 13:09:42 +0000
Message-ID: <E1vGzkE-005IUi-2X@gemulon.postgresql.org> (raw)

Disallow generated columns in COPY WHERE clause

Stored generated columns are not yet computed when the filtering
happens, so we need to prohibit them to avoid incorrect behavior.

Co-authored-by: jian he <jian.universality@gmail.com>
Reviewed-by: Kirill Reshke <reshkekirill@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxHb8YPQ095R_pYDr77W9XKNaXg5Rzy-WP525mkq+hRM3g@mail....

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/26958f4d99b16b1c638e6d43d46623e9c79579d5

Modified Files
--------------
src/backend/commands/copy.c             | 37 +++++++++++++++++++++++++++++++++
src/test/regress/expected/generated.out |  6 ++++++
src/test/regress/sql/generated.sql      |  4 ++++
3 files changed, 47 insertions(+)



view thread (7+ messages)  latest in thread

Message-ID: <E1vGzkE-005IUi-2X@gemulon.postgresql.org>
Permalink:  ../E1vGzkE-005IUi-2X@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vGzkE-005IUi-2X@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Disallow generated columns in COPY WHERE clause
  In-Reply-To: <E1vGzkE-005IUi-2X@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox