pgsql: Disallow ALTER TABLE ONLY / DROP EXPRESSION

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Disallow ALTER TABLE ONLY / DROP EXPRESSION
Дата
Msg-id E1kZxeA-0003tr-PU@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Disallow ALTER TABLE ONLY / DROP EXPRESSION

The current implementation cannot handle this correctly, so just
forbid it for now.

GENERATED clauses must be attached to the column definition and cannot
be added later like DEFAULT, so if a child table has a generation
expression that the parent does not have, the child column will
necessarily be an attlocal column.  So to implement ALTER TABLE ONLY /
DROP EXPRESSION, we'd need extra code to update attislocal of the
direct child tables, somewhat similar to how DROP COLUMN does it, so
that the resulting state can be properly dumped and restored.

Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/53977598174652dcb06bc2b26674c29b9ae601cc

Modified Files
--------------
src/backend/commands/tablecmds.c        | 22 +++++++++++++++++++---
src/test/regress/expected/generated.out | 11 ++++++-----
src/test/regress/sql/generated.sql      |  2 +-
3 files changed, 26 insertions(+), 9 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Remove deprecated containment operators for built-in types
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Allow users with BYPASSRLS to alter their own passwords.