]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix virtual generated column type checking for ALTER TABLE
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 24 Jun 2025 09:30:49 +0000 (11:30 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 24 Jun 2025 09:31:26 +0000 (11:31 +0200)
commit49fe1c83ecf3474776ea9d0db47ae5644d29b67b
treedf8476b4f3495846972c6f00c3e309c1df725d72
parent0cb5145a32c1a867a157e18493e24930338f5d6f
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.com
src/backend/commands/tablecmds.c
src/test/regress/expected/generated_virtual.out
src/test/regress/sql/generated_virtual.sql