Re: Virtual generated columns

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>, Zhang Mingli <zmlpostgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Virtual generated columns
Date: 2025-06-26 03:38:56
Message-ID: CAMbWs483-9-3L4BUKMqwVhBA7rEDgxmUnfScoZrnvCjLP3etvA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jun 2, 2025 at 2:31 PM jian he <jian(dot)universality(at)gmail(dot)com> wrote:
> On Thu, May 29, 2025 at 11:06 AM Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > Yeah, ATPrepAlterColumnType does seem like a better place. But we
> > need to ensure that ATColumnChangeRequiresRewrite sees the expanded
> > version of the expression — your proposed change fails to do that.
> >
> > Additionally, I think we also need to ensure that the virtual
> > generated columns are expanded before the expression is fed through
> > expression_planner, to ensure it can be successfully transformed into
> > an executable form.
> >
> > Hence, the attached patch.

> looks good to me.

Pushed.

Thanks
Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hayato Kuroda (Fujitsu) 2025-06-26 03:46:44 RE: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly
Previous Message Peter Smith 2025-06-26 03:36:10 Re: Skipping schema changes in publication