Make inherited TRUNCATE perform access permission checks on parent table only.
Fujii Masao <fujii@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +49 −18 |
| src/test/regress/expected/privileges.out | modified | +21 −0 |
| src/test/regress/sql/privileges.sql | modified | +14 −0 |
Discussion
- table partitioning and access privileges 25 messages · 2019-12-26 → 2020-02-18