agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Require UPDATE permission on FOR PORTION OF column
Date: Thu, 04 Jun 2026 09:53:20 +0000
Message-ID: <E1wV4lM-0011Pe-3B@gemulon.postgresql.org> (raw)

Require UPDATE permission on FOR PORTION OF column

It seems like the SQL standard does require this after all, and it
makes sense because these columns get changed.  (This is not to be
confused with *not* requiring INSERT permission to add the temporal
leftovers.)

Adding the column to RTEPermissionInfo->updatedCols also fixes a
couple outstanding bugs from other (non-permission) features using
that bitmapset to detect changes: GENERATED columns and UPDATE OF
triggers.  This patch includes test cases to exercise those scenarios,
including on partitioned tables.

Author: Paul A. Jungwirth <pj@illuminatedcomputing.com>
Reviewed-by: jian he <jian.universality@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CAHg%2BQDcd%3Dt69gLf9yQexO07EJ2mx0Z70NFHo6h94X1EDA%3DhM0g...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ac030d5b152475275e84e0abe0b3628700fbeda

Modified Files
--------------
src/backend/parser/analyze.c                 |  12 +-
src/test/regress/expected/for_portion_of.out | 190 ++++++++++++++++++++-------
src/test/regress/expected/privileges.out     |  12 +-
src/test/regress/sql/for_portion_of.sql      |  76 ++++++++++-
src/test/regress/sql/privileges.sql          |  10 +-
5 files changed, 241 insertions(+), 59 deletions(-)



Message-ID: <E1wV4lM-0011Pe-3B@gemulon.postgresql.org>
Permalink:  ../E1wV4lM-0011Pe-3B@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wV4lM-0011Pe-3B@gemulon.postgresql.org

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Require UPDATE permission on FOR PORTION OF column
  In-Reply-To: <E1wV4lM-0011Pe-3B@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox