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.
This commit is contained in:
Joe Conway 2015-07-29 09:47:49 -07:00
parent 13d856e177
commit efe72a82aa
1 changed files with 4 additions and 0 deletions

View File

@ -629,6 +629,8 @@ CreatePolicy(CreatePolicyStmt *stmt)
SHARED_DEPENDENCY_POLICY);
}
InvokeObjectPostCreateHook(PolicyRelationId, policy_id, 0);
/* Invalidate Relation Cache */
CacheInvalidateRelcache(target_table);
@ -860,6 +862,8 @@ AlterPolicy(AlterPolicyStmt *stmt)
SHARED_DEPENDENCY_POLICY);
}
InvokeObjectPostAlterHook(PolicyRelationId, policy_id, 0);
heap_freetuple(new_tuple);
/* Invalidate Relation Cache */