Skip to content

Commit 9c55391

Browse files
committed
RLS comment fixes.
The comments in get_policies_for_relation() say that CREATE POLICY does not support defining restrictive policies. This is no longer true, starting from PG10.
1 parent 26329ad commit 9c55391

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
bool cmd_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 the relevant list 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy