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:02:13 +0000 (14:02 +0100)
commit3717849e622d6d38be8f021cf230903d70926d5a
tree6ec9fa7d4667ac80637edab60030cbfbfe1acc35
parent324051fb890b927a5f85aa899d800f0162952d69
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