mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Add context info to OAT_POST_CREATE security hook
... and have sepgsql use it to determine whether to check permissions during certain operations. Indexes that are being created as a result of REINDEX, for instance, do not need to have their permissions checked; they were already checked when the index was created. Author: KaiGai Kohei, slightly revised by me
This commit is contained in:
@@ -643,6 +643,7 @@ make_new_heap(Oid OIDOldHeap, Oid NewTableSpace)
|
||||
ONCOMMIT_NOOP,
|
||||
reloptions,
|
||||
false,
|
||||
true,
|
||||
true);
|
||||
Assert(OIDNewHeap != InvalidOid);
|
||||
|
||||
|
@@ -596,7 +596,7 @@ DefineIndex(IndexStmt *stmt,
|
||||
stmt->isconstraint, stmt->deferrable, stmt->initdeferred,
|
||||
allowSystemTableMods,
|
||||
skip_build || stmt->concurrent,
|
||||
stmt->concurrent);
|
||||
stmt->concurrent, !check_rights);
|
||||
|
||||
/* Add any requested comment */
|
||||
if (stmt->idxcomment != NULL)
|
||||
|
@@ -630,7 +630,8 @@ DefineRelation(CreateStmt *stmt, char relkind, Oid ownerId)
|
||||
stmt->oncommit,
|
||||
reloptions,
|
||||
true,
|
||||
allowSystemTableMods);
|
||||
allowSystemTableMods,
|
||||
false);
|
||||
|
||||
/* Store inheritance information for new rel. */
|
||||
StoreCatalogInheritance(relationId, inheritOids);
|
||||
|
Reference in New Issue
Block a user