From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix virtual generated column type checking for ALTER TABLE
Date: Tue, 24 Jun 2025 09:40:48 +0000
Message-ID: <E1uU091-0036sx-2v@gemulon.postgresql.org> (raw)
Fix virtual generated column type checking for ALTER TABLE
Virtual generated columns have some special checks in
CheckAttributeType(), mainly to check that domains are not used. But
this check was only applied during CREATE TABLE, not during ALTER
TABLE. This fixes that.
Reported-by: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/CACJufxE0KHR__-h=zHXbhSNZXMMs4LYo4-dbj8H3YoStYBok1Q@mail.gmail...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/49fe1c83ecf3474776ea9d0db47ae5644d29b67b
Modified Files
--------------
src/backend/commands/tablecmds.c | 4 ++--
src/test/regress/expected/generated_virtual.out | 6 ++++++
src/test/regress/sql/generated_virtual.sql | 5 +++++
3 files changed, 13 insertions(+), 2 deletions(-)
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-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix virtual generated column type checking for ALTER TABLE
In-Reply-To: <E1uU091-0036sx-2v@gemulon.postgresql.org>
* 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