pgsql: Disallow generated columns in COPY WHERE clause
| От | Peter Eisentraut |
|---|---|
| Тема | pgsql: Disallow generated columns in COPY WHERE clause |
| Дата | |
| Msg-id | E1vGzkE-005IUb-2O@gemulon.postgresql.org обсуждение исходный текст |
| Список | pgsql-committers |
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.
Virtual generated columns currently error out ("unexpected virtual
generated column reference"). They could probably work if we expand
them in the right place, but for now let's keep them consistent with
the stored variant. This doesn't change the behavior, it only gives a
nicer error message.
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.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/aa606b9316a334cbc8c48560c72235f9e48e47bf
Modified Files
--------------
src/backend/commands/copy.c | 39 +++++++++++++++++++++++++
src/test/regress/expected/generated_stored.out | 6 ++++
src/test/regress/expected/generated_virtual.out | 6 ++++
src/test/regress/sql/generated_stored.sql | 4 +++
src/test/regress/sql/generated_virtual.sql | 4 +++
5 files changed, 59 insertions(+)
В списке pgsql-committers по дате отправления: