summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Conway <mail@joeconway.com>2015-07-29 09:47:49 -0700
committerJoe Conway <mail@joeconway.com>2015-07-29 09:47:49 -0700
commitefe72a82aa5e0d6f907a5d21f1a99b677f44f817 (patch)
treec7078e95430e8ede1b02489f6c1f72e5c00337b6
parent13d856e177e69083f543d6383eeda9e12ce3c55c (diff)
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.
-rw-r--r--src/backend/commands/policy.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/commands/policy.c b/src/backend/commands/policy.c
index 4642d7c6403..d8b43908ec4 100644
--- a/src/backend/commands/policy.c
+++ b/src/backend/commands/policy.c
@@ -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 */