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+hr...@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/3717849e622d6d38be8f021cf230903d70926d5a

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(+)

Reply via email to