Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value) - Mailing list pgsql-hackers

From Richard Guo
Subject Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)
Date
Msg-id CAMbWs4-SJ6B26ciFu_K_2M1ObDA=GirV87N1BKeAtSRmQGATUA@mail.gmail.com
Whole thread Raw
In response to Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)  (SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>)
Responses Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)
List pgsql-hackers
On Mon, Apr 13, 2026 at 10:59 AM SATYANARAYANA NARLAPURAM
<satyanarlapuram@gmail.com> wrote:
> NEW.<generated_coulmn> is resolved to the OLD row's value
> for update or NULL for insert cases in a DO ALSO rule action for
> generated columns.  This bug affects both stored and virtual
> generated columns. Reporting here to see if this is a known issue
> with generated columns.

I didn't find related item in open items.  This does not seem to be a
known issue.  I think we should fix it anyway.

cc-ing Peter.

- Richard



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: test_compression, test module for low-level compression APIs (for 2b5ba2a0a141)
Next
From: David Rowley
Date:
Subject: Re: Small and unlikely overflow hazard in bms_next_member()