pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathan@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add note about CreateStatistics()'s selective use of check_right
Date: Fri, 14 Nov 2025 19:20:44 +0000
Message-ID: <E1vJzLg-006c9u-2k@gemulon.postgresql.org> (raw)

Add note about CreateStatistics()'s selective use of check_rights.

Commit 5e4fcbe531 added a check_rights parameter to this function
for use by ALTER TABLE commands that re-create statistics objects.
However, we intentionally ignore check_rights when verifying
relation ownership because this function's lookup could return a
different answer than the caller's.  This commit adds a note to
this effect so that we remember it down the road.

Reviewed-by: Noah Misch <noah@leadboat.com>
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/29cf93b4b2a63273097c37f7dd0a0aed0f466798

Modified Files
--------------
src/backend/commands/statscmds.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)



view thread (6+ messages)  latest in thread

Message-ID: <E1vJzLg-006c9u-2k@gemulon.postgresql.org>
Permalink:  ../E1vJzLg-006c9u-2k@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vJzLg-006c9u-2k@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: nathan@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add note about CreateStatistics()'s selective use of check_right
  In-Reply-To: <E1vJzLg-006c9u-2k@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox