Re: Bug: Rule actions see wrong values for generated columns (NEW.gen reads OLD value)
SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
From: SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Chao Li <li.evan.chao@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Peter Eisentraut <peter@eisentraut.org>
Date: 2026-04-13T08:42:49Z
Lists: 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
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix incorrect NEW references to generated columns in rule rewriting
- 8e39951beac7 14.23 landed
- 7062bd577ec9 15.18 landed
- 07b257189ea4 16.14 landed
- 9d6208939a0a 17.10 landed
- e528bfe97190 18.4 landed
- c6a79be3f3c7 19 (unreleased) landed