Add object TRUNCATE hook

Enterprise / PostgreSQL - Joe Conway [] - 23 November 2019 15:39 UTC

All operations with acl permissions checks should have a corresponding hook so that, for example, mandatory access control (MAC) may be enforced by an extension. The command TRUNCATE is missing this hook, so add it. Patch by Yuli Khodorkovskiy with some editorialization by me. Based on the discussion not back-patched. A separate patch will exercise the hook in the sepgsql extension.

Author: Yuli Khodorkovskiy

f7a2002e82 Add object TRUNCATE hook
src/backend/catalog/objectaccess.c | 17 +++++++++++++++++
src/backend/commands/tablecmds.c | 2 ++
src/include/catalog/objectaccess.h | 14 +++++++++++++-
3 files changed, 32 insertions(+), 1 deletion(-)


  • Share