Обсуждение: pgsql: Make inherited TRUNCATE perform access permission checks on pare

Поиск
Список
Период
Сортировка

pgsql: Make inherited TRUNCATE perform access permission checks on pare

От
Fujii Masao
Дата:
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
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/56bc82a5111737d76f211356eeb2b1a8e657e8b4

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