Re: Dumping/restoring fails on inherited generated column
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>,
Daniel Gustafsson <daniel@yesql.se>, andrewbille@gmail.com,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-29T16:46:46Z
Lists: pgsql-hackers
I wrote: > The situation is different for GENERATED columns, since we disallow > a child having a different GENERATED property than the parent. BTW, that alleged prohibition is pretty damn leaky: d3=# create table pp1 (a int, b int GENERATED ALWAYS AS (a * 2) STORED); CREATE TABLE d3=# create table cc1 (a int, b int GENERATED ALWAYS AS (a * 3) STORED); CREATE TABLE d3=# alter table cc1 inherit pp1; ALTER TABLE Maybe the *real* fix here is to give up on this idea that they can't be different? regards, tom lane
Commits
-
Fix ALTER TABLE / INHERIT with generated columns
- 13ff139a2384 12.7 landed
- 64190d65f299 13.3 landed
- a970edbed306 14.0 landed
-
pg_dump: Fix dumping of inherited generated columns
- 1dd6baf78802 12.6 landed
- 1d3ce0223c6a 13.2 landed
- 0bf83648a52d 14.0 landed
-
Disallow ALTER TABLE ONLY / DROP EXPRESSION
- 539775981746 13.1 landed
- bf797a8d9768 14.0 landed
-
Fix several DDL issues of generated columns versus inheritance
- 086ffddf3656 13.0 cited