MCPcopy Create free account
hub / github.com/apache/cloudberry / sepgsql_index_modify

Function sepgsql_index_modify

contrib/sepgsql/relation.c:761–773  ·  view source on GitHub ↗

* sepgsql_index_modify * Handle index create, update, drop * * Unlike other relation kinds, indexes do not have their own security labels, * so instead of doing checks directly, treat them as extra attributes of their * owning tables; so check 'setattr' permissions on the table. */

Source from the content-addressed store, hash-verified

759 * owning tables; so check 'setattr' permissions on the table.
760 */
761static void
762sepgsql_index_modify(Oid indexOid)
763{
764 Relation catalog = table_open(IndexRelationId, AccessShareLock);
765
766 /* check db_table:{setattr} permission of the table being indexed */
767 sepgsql_relation_setattr_extra(catalog,
768 IndexRelidIndexId,
769 indexOid,
770 Anum_pg_index_indrelid,
771 Anum_pg_index_indexrelid);
772 table_close(catalog, AccessShareLock);
773}

Callers 3

sepgsql_relation_dropFunction · 0.85
sepgsql_relation_setattrFunction · 0.85

Calls 3

table_openFunction · 0.85
table_closeFunction · 0.85

Tested by

no test coverage detected