pgsql: CREATE INDEX: use the original userid for more ACL checks.

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: CREATE INDEX: use the original userid for more ACL checks.
Date: 2022-06-25 16:10:22
Message-ID: E1o58MY-001lnb-DB@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

CREATE INDEX: use the original userid for more ACL checks.

Commit a117cebd638dd02e5c2e791c25e43745f233111b used the original userid
for ACL checks located directly in DefineIndex(), but it still adopted
the table owner userid for more ACL checks than intended. That broke
dump/reload of indexes that refer to an operator class, collation, or
exclusion operator in a schema other than "public" or "pg_catalog".
Back-patch to v10 (all supported versions), like the earlier commit.

Nathan Bossart and Noah Misch

Discussion: https://postgr.es/m/f8a4105f076544c180a87ef0c4822352@stmuk.bayern.de

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/88b39e61486a8925a3861d50c306a51eaa1af8d6

Modified Files
--------------
contrib/citext/Makefile | 2 +-
contrib/citext/expected/create_index_acl.out | 81 ++++++++++++++++++++++++
contrib/citext/sql/create_index_acl.sql | 82 +++++++++++++++++++++++++
src/backend/commands/indexcmds.c | 92 ++++++++++++++++++++++++----
4 files changed, 244 insertions(+), 13 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Noah Misch 2022-06-25 21:17:03 pgsql: Fix PostgreSQL::Test aliasing for Perl v5.10.1.
Previous Message Peter Eisentraut 2022-06-24 11:10:49 pgsql: Remove unportable test