OSDN Git Service

Centralize DML permissions-checking logic.
authorRobert Haas <rhaas@postgresql.org>
Thu, 22 Jul 2010 00:47:59 +0000 (00:47 +0000)
committerRobert Haas <rhaas@postgresql.org>
Thu, 22 Jul 2010 00:47:59 +0000 (00:47 +0000)
commitb8c6c71d1c513391975fc107a95f104aeeac3117
treefac8a1a04bed94bd5944f1a3773aa4c4609e5f51
parent9f8cf32b341f3af070c512c7d6ad7f6a5aa7505b
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.
src/backend/commands/copy.c
src/backend/executor/execMain.c
src/backend/utils/adt/ri_triggers.c
src/include/executor/executor.h