Add note about CreateStatistics()'s selective use of check_rights.
authorNathan Bossart <[email protected]>
Fri, 14 Nov 2025 19:20:09 +0000 (13:20 -0600)
committerNathan Bossart <[email protected]>
Fri, 14 Nov 2025 19:20:09 +0000 (13:20 -0600)
commit505ce19a205add23934f61bbced98a1b9a74ec1f
treed3a6db3643ebc85237a3dc3836d1d0c0220bd36b
parent5bc251b288392fc432b6174c2a6e6a040fe1698e
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 <[email protected]>
Backpatch-through: 14
src/backend/commands/statscmds.c