Fix virtual generated column type checking for ALTER TABLE
Peter Eisentraut <peter@eisentraut.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +2 −2 |
| src/test/regress/expected/generated_virtual.out | modified | +6 −0 |
| src/test/regress/sql/generated_virtual.sql | modified | +5 −0 |
Discussion
- pg18: Virtual generated columns are not (yet) safe when superuser selects from them 45 messages · 2025-05-23 → 2025-06-25