Centralize DML permissions-checking logic.
Remove bespoke code in DoCopy and RI_Initial_Check, which now instead fabricate call ExecCheckRTPerms with a manufactured RangeTblEntry. This is intended to make it feasible for an enhanced security provider to actually make use of ExecutorCheckPerms_hook, but also has the advantage that RI_Initial_Check can allow use of the fast-path when column-level but not table-level permissions are present. KaiGai Kohei. Reviewed (in an earlier version) by Stephen Frost, and by me. Some further changes to the comments by me.
Showing
- src/backend/commands/copy.c 19 additions, 22 deletionssrc/backend/commands/copy.c
- src/backend/executor/execMain.c 37 additions, 27 deletionssrc/backend/executor/execMain.c
- src/backend/utils/adt/ri_triggers.c 30 additions, 6 deletionssrc/backend/utils/adt/ri_triggers.c
- src/include/executor/executor.h 3 additions, 2 deletionssrc/include/executor/executor.h
Loading
Please register or sign in to comment