ATTACH PARTITION seems to ignore column generation status - Mailing list pgsql-hackers

From Tom Lane
Subject ATTACH PARTITION seems to ignore column generation status
Date
Msg-id 2793383.1672944799@sss.pgh.pa.us
Whole thread Raw
Responses Re: ATTACH PARTITION seems to ignore column generation status
List pgsql-hackers
This does not seem good:

regression=# create table pp (a int, b int) partition by range(a);
CREATE TABLE
regression=# create table cc (a int generated always as (b+1) stored, b int);
CREATE TABLE
regression=# alter table pp attach partition cc for values from ('1') to ('10');
ALTER TABLE
regression=# insert into pp values(1,100);
INSERT 0 1
regression=# table pp;
  a  |  b
-----+-----
 101 | 100
(1 row)

I'm not sure to what extent it's sensible for partitions to have
GENERATED columns that don't match their parent; but even if that's
okay for payload columns I doubt we want to allow partitioning
columns to be GENERATED.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Reid Thompson
Date:
Subject: Re: Add the ability to limit the amount of memory that can be allocated to backends.
Next
From: Peter Geoghegan
Date:
Subject: Re: pgsql: Delay commit status checks until freezing executes.