Disallow generated columns in COPY WHERE clause
authorPeter Eisentraut <[email protected]>
Thu, 6 Nov 2025 10:52:47 +0000 (11:52 +0100)
committerPeter Eisentraut <[email protected]>
Thu, 6 Nov 2025 13:01:42 +0000 (14:01 +0100)
commit07f787e57399ad6108c181b020723db24fa1dbe0
tree2b3102f0172d228335e7613f047fac5720831099
parent726e77d7a94fd6d6ad99e439351ae6d4a48d3441
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 <[email protected]>
Reviewed-by: Kirill Reshke <[email protected]>
Reviewed-by: Masahiko Sawada <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/CACJufxHb8YPQ095R_pYDr77W9XKNaXg5Rzy-WP525mkq+hRM3g@mail.gmail.com
src/backend/commands/copy.c
src/test/regress/expected/generated.out
src/test/regress/sql/generated.sql