Re: Dumping/restoring fails on inherited generated column - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Dumping/restoring fails on inherited generated column
Date
Msg-id 661371.1601398006@sss.pgh.pa.us
Whole thread Raw
In response to Re: Dumping/restoring fails on inherited generated column  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: some pointless HeapTupleHeaderIndicatesMovedPartitions calls
Next
From: Tom Lane
Date:
Subject: Re: BUG #16419: wrong parsing BC year in to_date() function