pgsql: Make inherited TRUNCATE perform access permission checks on pare - Mailing list pgsql-committers

From Fujii Masao
Subject pgsql: Make inherited TRUNCATE perform access permission checks on pare
Date
Msg-id E1ixC3y-0007nn-6I@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Make inherited TRUNCATE perform access permission checks on parent table only.

Previously, TRUNCATE command through a parent table checked the
permissions on not only the parent table but also the children tables
inherited from it. This was a bug and inherited queries should perform
access permission checks on the parent table only. This commit fixes
that bug.

Back-patch to all supported branches.

Author: Amit Langote
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/CAHGQGwFHdSvifhJE+-GSNqUHSfbiKxaeQQ7HGcYz6SC2n_oDcg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e6f1e560e4c6e764080af8c8d5e76cdea4d8d00a

Modified Files
--------------
src/backend/commands/tablecmds.c         | 32 +++++++++++++++++++++++++-------
src/test/regress/expected/privileges.out | 21 +++++++++++++++++++++
src/test/regress/sql/privileges.sql      | 14 ++++++++++++++
3 files changed, 60 insertions(+), 7 deletions(-)


pgsql-committers by date:

Previous
From: Fujii Masao
Date:
Subject: pgsql: Make inherited TRUNCATE perform access permission checks on pare
Next
From: Tom Lane
Date:
Subject: pgsql: Fix test failure with non-MULTIPLICITY Perl interpreters.