Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9c55391

Browse files
committed
RLS comment fixes.
The comments in get_policies_for_relation() say that CREATE POLICYdoes not support defining restrictive policies. This is no longertrue, starting from PG10.
1 parent26329ad commit9c55391

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

‎src/backend/rewrite/rowsecurity.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,7 @@ get_policies_for_relation(Relation relation, CmdType cmd, Oid user_id,
408408
*permissive_policies=NIL;
409409
*restrictive_policies=NIL;
410410

411-
/*
412-
* First find all internal policies for the relation. CREATE POLICY does
413-
* not currently support defining restrictive policies, so for now all
414-
* internal policies are permissive.
415-
*/
411+
/* First find all internal policies for the relation. */
416412
foreach(item,relation->rd_rsdesc->policies)
417413
{
418414
boolcmd_matches= false;
@@ -450,7 +446,7 @@ get_policies_for_relation(Relation relation, CmdType cmd, Oid user_id,
450446
}
451447

452448
/*
453-
* Add this policy to the list of permissive policies if it applies to
449+
* Add this policy to therelevantlist of policies if it applies to
454450
* the specified role.
455451
*/
456452
if (cmd_matches&&check_role_for_policy(policy->roles,user_id))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp