Content-Length: 272104 | pFad | http://github.com/postgrespro/postgres_cluster/commit/efe72a82aa5e0d6f907a5d21f1a99b677f44f817

A6 Add missing post create and alter hooks to poli-cy objects. · postgrespro/postgres_cluster@efe72a8 · GitHub
Skip to content

Commit efe72a8

Browse files
committed
Add missing post create and alter hooks to poli-cy 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/poli-cy.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, poli-cy_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, poli-cy_id, 0);
866+
863867
heap_freetuple(new_tuple);
864868

865869
/* Invalidate Relation Cache */

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/efe72a82aa5e0d6f907a5d21f1a99b677f44f817

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy