106 List *permissive_policies;
107 List *restrictive_policies;
111 *securityQuals =
NIL;
112 *withCheckOptions =
NIL;
113 *hasRowSecurity =
false;
114 *hasSubLinks =
false;
119 if (rte->relkind != RELKIND_RELATION &&
120 rte->relkind != RELKIND_PARTITIONED_TABLE)
148 *hasRowSecurity =
true;
164 commandType = rt_index ==
root->resultRelation ?
197 List *update_permissive_policies;
198 List *update_restrictive_policies;
201 &update_permissive_policies,
202 &update_restrictive_policies);
205 update_permissive_policies,
206 update_restrictive_policies,
219 &restrictive_policies);
226 restrictive_policies,
244 List *select_permissive_policies;
245 List *select_restrictive_policies;
248 &select_permissive_policies,
249 &select_restrictive_policies);
252 select_permissive_policies,
253 select_restrictive_policies,
273 restrictive_policies,
287 List *select_permissive_policies =
NIL;
288 List *select_restrictive_policies =
NIL;
291 &select_permissive_policies,
292 &select_restrictive_policies);
296 select_permissive_policies,
297 select_restrictive_policies,
310 List *conflict_permissive_policies;
311 List *conflict_restrictive_policies;
312 List *conflict_select_permissive_policies =
NIL;
313 List *conflict_select_restrictive_policies =
NIL;
317 &conflict_permissive_policies,
318 &conflict_restrictive_policies);
328 conflict_permissive_policies,
329 conflict_restrictive_policies,
344 &conflict_select_permissive_policies,
345 &conflict_select_restrictive_policies);
348 conflict_select_permissive_policies,
349 conflict_select_restrictive_policies,
358 conflict_permissive_policies,
359 conflict_restrictive_policies,
373 conflict_select_permissive_policies,
374 conflict_select_restrictive_policies,
406 List *merge_update_permissive_policies;
407 List *merge_update_restrictive_policies;
408 List *merge_delete_permissive_policies;
409 List *merge_delete_restrictive_policies;
410 List *merge_insert_permissive_policies;
411 List *merge_insert_restrictive_policies;
412 List *merge_select_permissive_policies =
NIL;
413 List *merge_select_restrictive_policies =
NIL;
420 &merge_update_permissive_policies,
421 &merge_update_restrictive_policies);
429 merge_update_permissive_policies,
430 merge_update_restrictive_policies,
438 merge_update_permissive_policies,
439 merge_update_restrictive_policies,
452 &merge_select_permissive_policies,
453 &merge_select_restrictive_policies);
456 merge_select_permissive_policies,
457 merge_select_restrictive_policies,
468 &merge_delete_permissive_policies,
469 &merge_delete_restrictive_policies);
477 merge_delete_permissive_policies,
478 merge_delete_restrictive_policies,
489 &merge_insert_permissive_policies,
490 &merge_insert_restrictive_policies);
494 merge_insert_permissive_policies,
495 merge_insert_restrictive_policies,
509 merge_select_permissive_policies,
510 merge_select_restrictive_policies,
529 *hasRowSecurity =
true;
#define Assert(condition)
#define OidIsValid(objectId)
RTEPermissionInfo * getRTEPermissionInfo(List *rteperminfos, RangeTblEntry *rte)
@ WCO_RLS_MERGE_UPDATE_CHECK
@ WCO_RLS_MERGE_DELETE_CHECK
void setRuleCheckAsUser(Node *node, Oid userid)
int check_enable_rls(Oid relid, Oid checkAsUser, bool noError)
static void add_with_check_options(Relation rel, int rt_index, WCOKind kind, List *permissive_policies, List *restrictive_policies, List **withCheckOptions, bool *hasSubLinks, bool force_using)
static void get_policies_for_relation(Relation relation, CmdType cmd, Oid user_id, List **permissive_policies, List **restrictive_policies)
static void add_security_quals(int rt_index, List *permissive_policies, List *restrictive_policies, List **securityQuals, bool *hasSubLinks)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)