• Peter Eisentraut's avatar
    Disallow ALTER TABLE ONLY / DROP EXPRESSION · bf797a8d
    Peter Eisentraut authored
    The current implementation cannot handle this correctly, so just
    forbid it for now.
    
    GENERATED clauses must be attached to the column definition and cannot
    be added later like DEFAULT, so if a child table has a generation
    expression that the parent does not have, the child column will
    necessarily be an attlocal column.  So to implement ALTER TABLE ONLY /
    DROP EXPRESSION, we'd need extra code to update attislocal of the
    direct child tables, somewhat similar to how DROP COLUMN does it, so
    that the resulting state can be properly dumped and restored.
    
    Discussion: https://www.postgresql.org/message-id/flat/15830.1575468847%40sss.pgh.pa.us
    bf797a8d
generated.sql 17.8 KB