Re: FOR PORTION OF does not recompute GENERATED STORED columns that depend on the range column
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Paul A Jungwirth <pj@illuminatedcomputing.com>,
Chao Li <li.evan.chao@gmail.com>
Cc: jian he <jian.universality@gmail.com>,
SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-04T09:58:48Z
Lists: pgsql-hackers
On 26.05.26 00:23, Paul A Jungwirth wrote: > On Fri, May 8, 2026 at 8:25 AM Paul A Jungwirth > <pj@illuminatedcomputing.com> wrote: >> >> On Fri, May 8, 2026 at 12:10 AM Chao Li <li.evan.chao@gmail.com> wrote: >>>> <v11-0001-Fix-FOR-PORTION-OF-column-dependency-tracking.patch><v11-0002-Fix-FOR-PORTION-OF-with-partitions-and-inheritan.patch> >>> >>> Thanks for updating the patch and making the separation. After reading v11, I still have a few comments for 0001. >> . . . >> >> v12 attached. > > After discussing this as PGConf.dev, Peter and I agreed that we > *should* be checking for UPDATE permission on the application-time > column. So we need to add the attno to updatedCols on the > RTEPermissionInfo. That is great, because it fixes GENERATED column > dependency tracking and also UPDATE OF triggers, without the > complexity of changing ExecGetUpdatedCols. > > Note we still do not require INSERT permission for the temporal > leftovers, which is what the SQL Standard says and also makes sense > semantically, since those leftovers represent already-existing > history. > > No RLS changes are needed because RLS policies aren't checked based on > *column* changes. > > We still need a fix for non-partitioning inheritance, but the patch > becomes a lot simpler. > > Here is a patch adding the application-time column to updatedCols, > along with the tests we've written for GENERATED columns and UPDATE OF > triggers. committed
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Small terminology fixes in comments
- f0aedc7cb0ed 19 (unreleased) landed
-
Require UPDATE permission on FOR PORTION OF column
- 7ac030d5b152 19 (unreleased) landed