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_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8278737bfd0a37b68121a42a0b0a6775488adb48

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