pgsql: Fix ALTER TABLE / INHERIT with generated columns - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Fix ALTER TABLE / INHERIT with generated columns
Date
Msg-id E1ldsDN-0006tK-Hf@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix ALTER TABLE / INHERIT with generated columns

When running ALTER TABLE t2 INHERIT t1, we must check that columns in
t2 that correspond to a generated column in t1 are also generated and
have the same generation expression.  Otherwise, this would allow
creating setups that a normal CREATE TABLE sequence would not allow.

Discussion: https://www.postgresql.org/message-id/22de27f6-7096-8d96-4619-7b882932ca25@2ndquadrant.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/13ff139a238480cd3221c51c269d5ccdd429594f

Modified Files
--------------
src/backend/commands/tablecmds.c        | 60 +++++++++++++++++++++++++++++++++
src/test/regress/expected/generated.out | 21 ++++++++++++
src/test/regress/sql/generated.sql      | 14 ++++++++
3 files changed, 95 insertions(+)


pgsql-committers by date:

Previous
From: Alexander Korotkov
Date:
Subject: pgsql: Remove mention of the version number from pg_trgm docs
Next
From: Peter Eisentraut
Date:
Subject: pgsql: pg_dump: Fix dump of generated columns in partitions