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

From SATYANARAYANA NARLAPURAM
Subject Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)
Date
Msg-id CAHg+QDda7fkd_z6ZXuhRVtVyRf2J=BCP9nRrHqL2_0=HWQnzSA@mail.gmail.com
Whole thread
In response to Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers
Hi Richard,

On Mon, Apr 13, 2026 at 1:30 AM Richard Guo <guofenglinux@gmail.com> wrote:
On Mon, Apr 13, 2026 at 4:27 PM SATYANARAYANA NARLAPURAM
<satyanarlapuram@gmail.com> wrote:
> On Mon, Apr 13, 2026 at 12:21 AM Chao Li <li.evan.chao@gmail.com> wrote:
>> Do either of you plan to propose a patch for this? If so, please go ahead and I can review it. Otherwise, I can propose a patch in a couple of days.

> I have a patch with me, let me post it shortly.

Please feel free to share your patches.  I've been looking into this
as well, but I'd be happy to see independent takes on it.

I reviewed your patch, it looks good. I ran the tests you added and a few additional tests and they are passing. Please continue with your patch.
Maybe a test like "WHERE NEW.b > threshold" to confirm the expansion happens before qual evaluation would be good.
 
Thanks,
Satya

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Heads Up: cirrus-ci is shutting down June 1st
Next
From: "cca5507"
Date:
Subject: Return value of XLogInsertRecord() for XLOG_SWITCH record