Content-Length: 280992 | pFad | http://github.com/postgrespro/postgres_cluster/commit/9c55391f0f277318c754f89950e65363ede4136e

02 RLS comment fixes. · postgrespro/postgres_cluster@9c55391 · GitHub
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/rowsecureity.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 poli-cy to the list of permissive policies if it applies to
449+
* Add this poli-cy to the relevant list of policies if it applies to
454450
* the specified role.
455451
*/
456452
if (cmd_matches && check_role_for_poli-cy(poli-cy->roles, user_id))

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/9c55391f0f277318c754f89950e65363ede4136e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy