On Thu, Mar 27, 2025 at 11:44 AM David G. Johnston
<david.g.johns...@gmail.com> wrote:
>
> On Wednesday, March 26, 2025, Tom Lane <t...@sss.pgh.pa.us> wrote:
>>
>> jian he <jian.universal...@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.
>
This discussion [0] wants to change stored to virtual.

drop the virtual generation, not materialize, column value will be NULL,
but that will not work because commit [1]

So we are either saying that
virtual generation expression cannot be dropped, you can only
substitute another expression
or drop the expression, based on the dropped expression materializing
that column value.

[0]: 
https://postgr.es/m/CAFCRh-8grTkEy%2B73q79iXB%2Bq%2BsD%3DQkbz-vNAN1KJCF6PRLa%3Dzg%40mail.gmail.com
[1]: 
https://git.postgresql.org/cgit/postgresql.git/commit/?id=cdc168ad4b22ea4183f966688b245cabb5935d1f


Reply via email to