From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Amit Langote <amitlangote09@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: ATTACH PARTITION seems to ignore column generation status
Date: Thu, 16 Feb 2023 17:40:22 -0500
Message-ID: <2334335.1676587222@sss.pgh.pa.us> (raw)
In-Reply-To: <20230216180542.fdy5fnwkcbnhen6m@alvherre.pgsql>
References: <20230216180542.fdy5fnwkcbnhen6m@alvherre.pgsql>
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2023-Feb-16, Alexander Lakhin wrote:
>> I've encountered a query that triggers an assert added in that commit:
>> CREATE TABLE t(a int, b int GENERATED ALWAYS AS (a) STORED) PARTITION BY
>> RANGE (a);
>> CREATE TABLE tp PARTITION OF t(b DEFAULT 1) FOR VALUES FROM (0) to (1);
> It seems wrong that this command is accepted. It should have given an
> error, because the partition is not allowed to override the generation
> of the value that is specified in the parent table.
Agreed. We missed a check somewhere, will fix.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, alvherre@alvh.no-ip.org, exclusion@gmail.com, amitlangote09@gmail.com, peter.eisentraut@enterprisedb.com
Subject: Re: ATTACH PARTITION seems to ignore column generation status
In-Reply-To: <2334335.1676587222@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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