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

Commit4f7a95b

Browse files
committed
Apply RLS policies to partitioned tables.
The new partitioned table capability added a new relkind, namelyRELKIND_PARTITIONED_TABLE. Update fireRIRrules() to apply RLSpolicies on RELKIND_PARTITIONED_TABLE as it does RELKIND_RELATION.In addition, add RLS regression test coverage for partitioned tables.Issue raised by Fakhroutdinov Evgenievich and patch by Mike Palmiotto.Regression test editorializing by me.Discussion:https://postgr.es/m/flat/20170601065959.1486.69906@wrigleys.postgresql.org
1 parent93b7d97 commit4f7a95b

File tree

3 files changed

+572
-1
lines changed

3 files changed

+572
-1
lines changed

‎src/backend/rewrite/rewriteHandler.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1835,7 +1835,8 @@ fireRIRrules(Query *parsetree, List *activeRIRs, bool forUpdatePushedDown)
18351835

18361836
/* Only normal relations can have RLS policies */
18371837
if (rte->rtekind!=RTE_RELATION||
1838-
rte->relkind!=RELKIND_RELATION)
1838+
(rte->relkind!=RELKIND_RELATION&&
1839+
rte->relkind!=RELKIND_PARTITIONED_TABLE))
18391840
continue;
18401841

18411842
rel=heap_open(rte->relid,NoLock);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp