Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

Vik Fearing <vik@postgresfriends.org>

From: Vik Fearing <vik@postgresfriends.org>
To: Amul Sul <sulamul@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-08-22T11:01:57Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. ALTER TABLE command to change generation expression

  2. Refactor: separate function to find all objects depending on a column

  3. Turn AT_PASS_* macros into an enum

On 8/2/23 12:35, Amul Sul wrote:
> Hi,
> 
> Currently, we have an option to drop the expression of stored generated
> columns
> as:
> 
> ALTER [ COLUMN ] column_name DROP EXPRESSION [ IF EXISTS ]
> 
> But don't have support to update that expression. The attached patch
> provides
> that as:
> 
> ALTER [ COLUMN ] column_name SET EXPRESSION expression

I am surprised this is not in the standard already.  I will go work on that.
-- 
Vik Fearing