Definition at line 52 of file rls.c.
53{
57 bool relrowsecurity;
58 bool relforcerowsecurity;
59 bool amowner;
60
61
64
65
70
71 relrowsecurity = classform->relrowsecurity;
72 relforcerowsecurity = classform->relforcerowsecurity;
73
75
76
77 if (!relrowsecurity)
79
80
81
82
83
84
85
86
89
90
91
92
93
94
95
96
97
99 if (amowner)
100 {
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
118 }
119
120
121
122
123
126 (
errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
127 errmsg(
"query would be affected by row-level security policy for table \"%s\"",
129 amowner ?
errhint(
"To disable the policy for the table's owner, use ALTER TABLE NO FORCE ROW LEVEL SECURITY.") : 0));
130
131
133}
bool has_bypassrls_privilege(Oid roleid)
bool object_ownercheck(Oid classid, Oid objectid, Oid roleid)
#define OidIsValid(objectId)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
char * get_rel_name(Oid relid)
bool InNoForceRLSOperation(void)
FormData_pg_class * Form_pg_class
static Datum ObjectIdGetDatum(Oid X)
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache1(int cacheId, Datum key1)
#define FirstNormalObjectId
References ereport, errcode(), errhint(), errmsg(), ERROR, FirstNormalObjectId, get_rel_name(), GETSTRUCT(), GetUserId(), has_bypassrls_privilege(), HeapTupleIsValid, InNoForceRLSOperation(), object_ownercheck(), ObjectIdGetDatum(), OidIsValid, ReleaseSysCache(), RLS_ENABLED, RLS_NONE, RLS_NONE_ENV, row_security, and SearchSysCache1().
Referenced by BuildIndexValueDescription(), DoCopy(), ExecBuildSlotPartitionKeyDescription(), ExecBuildSlotValueDescription(), get_row_security_policies(), intorel_startup(), LogicalRepSyncTableStart(), ri_ReportViolation(), row_security_active(), row_security_active_name(), and TargetPrivilegesCheck().