Re: [patch] ALTER COLUMN SET EXPRESSION [GENERATED|STORED]

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [patch] ALTER COLUMN SET EXPRESSION [GENERATED|STORED]
Date: 2026-01-07 04:06:13
Message-ID: CACJufxEcKjQgQpnadHdLdW-os2VRuy-xe=2tebgK18jDvDFkUQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

hi.

I found a use case for this patch:
If you want to change a column from stored to virtual, or from virtual to
stored, you previously had to drop the column and re-add it as a stored or
virtual generated column. This would break all existing dependencies, requiring
them to be recreated from scratch. With this patch, the process is much more
convenient, as RememberAllDependentForRebuilding is used internally to rebuild
all dependencies automatically.

A rebased patch is attached.

--
jian
https://www.enterprisedb.com/

Attachment Content-Type Size
v3-0001-ALTER-COLUMN-SET-EXPRESSION-VIRTUAL-STORED.patch application/x-patch 58.5 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xuneng Zhou 2026-01-07 04:08:18 Re: Implement waiting for wal lsn replay: reloaded
Previous Message zengman 2026-01-07 03:49:24 Re: Support for 8-byte TOAST values (aka the TOAST infinite loop problem)