Make inherited TRUNCATE perform access permission checks on parent table only.

Fujii Masao <fujii@postgresql.org>

Commit: 606f350de92a15fdb2c6a3c209f60cf74d2825e7
Author: Fujii Masao <fujii@postgresql.org>
Date: 2020-01-30T15:46:20Z
Releases: 9.5.21
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

Discussion