Skip to content

Commit efe72a8

Browse files
committed
Add missing post create and alter hooks to policy objects.
AlterPolicy() and CreatePolicy() lacked their respective hook invocations. Noted by Noah Misch, review by Dean Rasheed. Back-patch to 9.5 where RLS was introduced.
1 parent 13d856e commit efe72a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/backend/commands/policy.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,8 @@ CreatePolicy(CreatePolicyStmt *stmt)
629629
SHARED_DEPENDENCY_POLICY);
630630
}
631631

632+
InvokeObjectPostCreateHook(PolicyRelationId, policy_id, 0);
633+
632634
/* Invalidate Relation Cache */
633635
CacheInvalidateRelcache(target_table);
634636

@@ -860,6 +862,8 @@ AlterPolicy(AlterPolicyStmt *stmt)
860862
SHARED_DEPENDENCY_POLICY);
861863
}
862864

865+
InvokeObjectPostAlterHook(PolicyRelationId, policy_id, 0);
866+
863867
heap_freetuple(new_tuple);
864868

865869
/* Invalidate Relation Cache */

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