Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com>
Cc: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, SATYANARAYANA NARLAPURAM <satyanarlapuram(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Peter Eisentraut <peter(at)eisentraut(dot)org>
Subject: Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)
Date: 2026-04-21 06:05:07
Message-ID: CAMbWs49TqEtOg5J-NXjx-P=ceEazgr-iP0zAKxhOL9VRPMtGyQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 20, 2026 at 5:42 PM Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> On Mon, 20 Apr 2026 at 08:29, Richard Guo <guofenglinux(at)gmail(dot)com> wrote:
> > Attached v3 fixes them.

> LGTM.

Thanks! I've pushed and back-patched to v14 (all supported branches).

Virtual generated columns and some helper functions such as
build_generation_expression were added in v18, so the back-patches in
pre-v18 branches differ slightly from the v18+ patches.

- Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Antonin Houska 2026-04-21 06:09:42 Re: repack: fix a bug to reject deferrable primary key fallback for concurrent mode
Previous Message SATYANARAYANA NARLAPURAM 2026-04-21 05:58:40 Re: [Bug][patch]: After dropping the last label from a property graph element, invoking pg_get_propgraphdef() triggers an assertion failure