On Wednesday, March 26, 2025, Tom Lane <
tgl@sss.pgh.pa.us> wrote:
jian he <jian.universality@gmail.com> writes:
> the attached patch is to implement $subject.
Why would this be a good idea? I don't see any principled fallback
definition of the column. (No, "NULL" is not that.) Certainly we
should support ALTER TABLE DROP COLUMN, but removing the expression
and not providing a substitute seems semantically nonsensical.
I don’t follow how NULL got involved in this discussion. The proposal is basically: turn the virtual expression into an equivalent stored expression, then drop the expression.
I suppose it would make sense to first add an alter table command to allow the user to do a virtual/stored mode swap manually before adding this, which then just becomes a convenient way to specify swap-and-drop as a single command.
David J.