pgsql: Add note about CreateStatistics()'s selective use of check_right

From: Nathan Bossart <nathan(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add note about CreateStatistics()'s selective use of check_right
Date: 2025-11-14 19:20:44
Message-ID: E1vJzLg-006cA4-2w@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)leadboat(dot)com>
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4c179ccb05062ebf29c2936e67842010d71742d0

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

Browse pgsql-committers by date

  From Date Subject
Next Message Nathan Bossart 2025-11-14 19:46:06 pgsql: Comment out autovacuum_worker_slots in postgresql.conf.sample.
Previous Message Bruce Momjian 2025-11-14 17:55:00 Re: pgsql: doc: remove verbiage about "receiving" data from rep. slots