mirror of
https://github.com/postgres/postgres.git
synced 2025-11-06 07:49:08 +03:00
RLS refactoring
This refactors rewrite/rowsecurity.c to simplify the handling of the default deny case (reducing the number of places where we check for and add the default deny policy from three to one) by splitting up the retrival of the policies from the application of them. This also allowed us to do away with the policy_id field. A policy_name field was added for WithCheckOption policies and is used in error reporting, when available. Patch by Dean Rasheed, with various mostly cosmetic changes by me. Back-patch to 9.5 where RLS was introduced to avoid unnecessary differences, since we're still in alpha, per discussion with Robert.
This commit is contained in:
@@ -928,6 +928,7 @@ typedef struct WithCheckOption
|
||||
NodeTag type;
|
||||
WCOKind kind; /* kind of WCO */
|
||||
char *relname; /* name of relation that specified the WCO */
|
||||
char *polname; /* name of RLS policy being checked */
|
||||
Node *qual; /* constraint qual to check */
|
||||
bool cascaded; /* true for a cascaded WCO on a view */
|
||||
} WithCheckOption;
|
||||
|
||||
Reference in New Issue
Block a user