pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix ALTER TABLE / INHERIT with generated columns
3+ messages / 1 participants
[nested] [flat]

* pgsql: Fix ALTER TABLE / INHERIT with generated columns
@ 2021-05-04 10:23 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2021-05-04 10:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a970edbed306354b0079bdcdc2fc74312122ad89

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix ALTER TABLE / INHERIT with generated columns
@ 2021-05-04 10:23 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2021-05-04 10:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/64190d65f2995203df401738b77adc5ebd4d2fce

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Fix ALTER TABLE / INHERIT with generated columns
@ 2021-05-04 10:23 Peter Eisentraut <peter@eisentraut.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Peter Eisentraut @ 2021-05-04 10:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2021-05-04 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 10:23 pgsql: Fix ALTER TABLE / INHERIT with generated columns Peter Eisentraut <peter@eisentraut.org>
2021-05-04 10:23 pgsql: Fix ALTER TABLE / INHERIT with generated columns Peter Eisentraut <peter@eisentraut.org>
2021-05-04 10:23 pgsql: Fix ALTER TABLE / INHERIT with generated columns Peter Eisentraut <peter@eisentraut.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox